diff --git a/README.md b/README.md index 783f996..a2a8b99 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/evaluate_algorithm.py b/evaluate_algorithm.py index 1ec2562..1c1de9d 100644 --- a/evaluate_algorithm.py +++ b/evaluate_algorithm.py @@ -18,4 +18,4 @@ evaluation_results = pipeline.run(100) print(evaluation_results.records) # the raw curves - print(evaluation_results.get_performance()) # the summary \ No newline at end of file + print(evaluation_results.get_performance()) # the summary diff --git a/prototype4evaluation/Pipeline.py b/prototype4evaluation/Pipeline.py index 5ba4352..410fe25 100644 --- a/prototype4evaluation/Pipeline.py +++ b/prototype4evaluation/Pipeline.py @@ -12,6 +12,7 @@ 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.') @@ -19,8 +20,8 @@ def _run_parallel(self): 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)