Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# Installation

Assumes a clean install of Ubuntu 18.04 LTS

- Install deps

```bash
sudo apt update
sudo apt install python3-dev python3-pip
sudo pip3 install -U virtualenv # system-wide install
```

- Create virtualenv

```bash
virtualenv --system-site-packages -p python3 ./p4e_env
```

- Source environment and install deps

```bash
pip3 install --upgrade tensorflow(-gpu)
pip3 install keras-rl
pip3 install numpy
pip3 install 'gym[box2d]'
pip3 install 'gym[classic_control]'
```

# Framework agnostic example scripts


Expand Down
2 changes: 1 addition & 1 deletion evaluate_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

evaluation_results = pipeline.run(100)
print(evaluation_results.records) # the raw curves
print(evaluation_results.get_performance()) # the summary
print(evaluation_results.get_performance()) # the summary
5 changes: 3 additions & 2 deletions prototype4evaluation/Pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ def __init__(self,
self.algorithm_arguments = algorithm_arguments
self.evaluation_constructor = evaluation_constructor
self.evaluation_arguments = evaluation_arguments
self.repeats = repeats

def _run_parallel(self):
raise NotImplementedError('Future work.')

def run(self, training_steps):
evaluation = self.evaluation_constructor(**self.evaluation_arguments)

for rank in range(3):
print('Replicate {}/{}'.format(rank+1, 3))
for rank in range(self.repeats):
print('Repeat {}/{}'.format(rank+1, 3))
algorithm = self.algorithm_constructor(evaluation.environment_details,
**self.algorithm_arguments)

Expand Down