Skip to content

Commit ec6805d

Browse files
committed
Another one
1 parent a5c4dcd commit ec6805d

File tree

9 files changed

+2296
-725
lines changed

9 files changed

+2296
-725
lines changed

Experiments.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Docker Experiments
22

3-
Build Docker image with current ACS implementation and Jupyter Lab image
4-
3+
Build Docker image with current ACS implementation and Jupyter Lab image
4+
55
docker build -f Dockerfile.experiments -t acs .
66

77
You can run it locally to test if everything is working fine
@@ -23,5 +23,7 @@ To run Jupyter notebook to see processed results type:
2323
To run a single parametrized experiment type something like:
2424

2525
docker run -d --rm -v `pwd`/notebooks:/code/notebooks --name mountaincar khozzy/acs-notebook papermill "notebooks/ACS2_in_MountainCar.ipynb" "notebooks/mc_500k_DecayFalse_10bins.ipynb" --log-output -p trials 500000 -p decay False -p bins 10
26+
27+
docker run --rm -v `pwd`/notebooks:/code/notebooks --name "MC" acs:3 papermill "notebooks/MountainCar.ipynb" "notebooks/results/mc.ipynb" --log-output -p trials 1000 -p decay False -p bins 14 -p gamma 0.97 -p biased_exploration 0
2628

2729

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.PHONY: docs
2+
experiments_image = acs:2
23

34
docs:
45
(cd docs && make html)
@@ -13,6 +14,11 @@ test: lint
1314
notebook:
1415
jupyter lab --notebook-dir notebooks/
1516

17+
publish_experiments_docker_image:
18+
docker build -f Dockerfile.experiments -t $(experiments_image) .
19+
docker tag $(experiments_image) khozzy/$(experiments_image)
20+
docker push khozzy/$(experiments_image)
21+
1622
execute_notebooks:
1723
# papermill notebooks/rACS_Corridor.ipynb docs/source/notebooks/rACS_Corridor.ipynb
1824
papermill notebooks/FrozenLake.ipynb docs/source/notebooks/FrozenLake.ipynb

lcs/agents/acs2/Configuration.py

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,5 @@ def __init__(self,
9696
self.mu = mu
9797
self.chi = chi
9898

99-
def __str__(self):
100-
return "ACS2Configuration:" \
101-
"\n\t- Classifier length: [{}]" \
102-
"\n\t- Number of possible actions: [{}]" \
103-
"\n\t- Environment adapter function: [{}]" \
104-
"\n\t- Fitness function: [{}]" \
105-
"\n\t- Do GA: [{}]" \
106-
"\n\t- Do subsumption: [{}]" \
107-
"\n\t- Do Action Planning: [{}]" \
108-
"\n\t- Beta: [{}]" \
109-
"\n\t- ..." \
110-
"\n\t- Epsilon: [{}]" \
111-
"\n\t- U_max: [{}]" \
112-
.format(self.classifier_length,
113-
self.number_of_possible_actions,
114-
self.environment_adapter,
115-
self.fitness_fcn,
116-
self.do_ga,
117-
self.do_subsumption,
118-
self.do_action_planning,
119-
self.beta,
120-
self.epsilon,
121-
self.u_max)
99+
def __str__(self) -> str:
100+
return str(vars(self))

0 commit comments

Comments
 (0)