Skip to content

Commit

Permalink
Updated folder names and folder paths code
Browse files Browse the repository at this point in the history
  • Loading branch information
dagenaik committed Aug 9, 2024
1 parent 4e47773 commit 68ab330
Show file tree
Hide file tree
Showing 149 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests
name: Unit 07-tests

on:
push:
Expand Down Expand Up @@ -26,7 +26,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e $GITHUB_WORKSPACE
- name: Unit tests
- name: Unit 07-tests
run: |
python -m tests.grid_tests
python -m tests.model_tests
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/advice_tools.py → 04-src/advice_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, size, seed):
self._size = size
self._seed = seed

self._MAPS_PATH = './maps'
self._MAPS_PATH = './02-maps'
self._facts = self.parse_map()
self._advice = self.generate_advice_from_facts()

Expand Down
4 changes: 2 additions & 2 deletions src/analysis.py → 04-src/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

filename = f'{size}x{size}-seed{seed}'
inputFolder = f'./experiments/{name}'
resultsPath = './analysis-output'
experiments_input_path = './input'
resultsPath = './06-analysis-output'
experiments_input_path = './03-input'


class DataKind(Enum):
Expand Down
2 changes: 1 addition & 1 deletion src/map_tools.py → 04-src/map_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def render_map_from_description(self, map_desc, imgfile):

options = parser.parse_args()

map_tools = MapTools('./maps')
map_tools = MapTools('./02-maps')
if(options.default):
map_tools.render_default_map()
else:
Expand Down
2 changes: 1 addition & 1 deletion src/model.py → 04-src/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(self, map_size: int, advice_list: list):
self.advice_list = advice_list

def __str__(self):
return f'Advisor input with {len(self.advice_list)} pieces of advice.'
return f'Advisor 03-input with {len(self.advice_list)} pieces of advice.'

"""
Advice: Value of a cell
Expand Down
8 changes: 4 additions & 4 deletions src/runner.py → 04-src/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def __init__(self, size, seed, numexperiments, maxepisodes, log_level=logging.IN
self._GAMMA = 1

#File paths
self._INPUT_PATH = './input'
self._reward_results_PATH = './experiments'
self._INPUT_PATH = './03-input'
self._reward_results_PATH = './05-experiments'
self._FILE_PATTERN = f'{size}x{size}-seed{seed}'
self._MAP_NAME = f'{size}x{size}'

Expand Down Expand Up @@ -175,7 +175,7 @@ def discrete_policy_grad(self, max_episodes, advice=None, is_random=False):
policy = self.get_default_policy(environment)
if advice:
original_policy = policy
#logging.info(f'\t\t\t Shaping policy with advisor input at u={advice.u}') #TODO does not work with coop
#logging.info(f'\t\t\t Shaping policy with advisor 03-input at u={advice.u}') #TODO does not work with coop
policy = self.shape_policy(policy, advice)
#if advice.u==1.0: # TODO does not work with coop
# assert np.array_equal(original_policy, policy)
Expand Down Expand Up @@ -317,7 +317,7 @@ def run_experiment_coop(self, max_episodes, quota, advisor1_position, advisor2_p
logging.info(f'====== COOP ADVISED AGENT WITH {max_episodes} EPISODES ======')
logging.info(f'QUOTA: {quota} ** ADVISOR1: {advisor1_position} ** ADVISOR2: {advisor2_position}')

# get advisor input
# get advisor 03-input
advisor1_id = "A1"
advisor2_id = "A2"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def tearDown(self):
del(self._parser)

def testValidInput(self):
file = os.path.abspath("tests/validinput.txt")
file = os.path.abspath("07-tests/validinput.txt")

with open(file, 'r') as f:
lines = len(f.readlines())
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version='0.1',
author='Kyanna Dagenais, Istvan David',
url='https://www.python.org/sigs/distutils-sig/',
packages=['src'],
packages=['04-src'],
include_package_data=True,
install_requires=[],
license='GNU General Public License v3.0'
Expand Down

0 comments on commit 68ab330

Please sign in to comment.