Skip to content
Snippets Groups Projects
Commit 42f97a8e authored by Philip Maas's avatar Philip Maas
Browse files

Added legend to action mutation plot

parent ae9fb663
No related branches found
No related tags found
No related merge requests found
EvolutionStrategies/Experiments/12_1_50_decaying_decaying_300/12_1_50_0.03.png

29.5 KiB

File added
...@@ -9,12 +9,12 @@ BIAS = False ...@@ -9,12 +9,12 @@ BIAS = False
POP_SIZE = 50 POP_SIZE = 50
MUTATION_FACTOR = 0.1 # 0 <= x <= 1 MUTATION_FACTOR = 0.1 # 0 <= x <= 1
LEARNING_RATE = 0.03 # 0 <= x <= 1 LEARNING_RATE = 0.03 # 0 <= x <= 1
GENS = 7000 GENS = 10000
MAX_STEPS = 300 # after 1600 steps the Environment gives us a done anyway. MAX_STEPS = 300 # after 1600 steps the Environment gives us a done anyway.
DECAY_ALPHA = True DECAY_ALPHA = True
VERSION = 100 VERSION = 100
TEST_WALKER = False TEST_WALKER = True
LOAD_BRAIN = False LOAD_BRAIN = False
RENDER_BEST = False RENDER_BEST = False
if TEST_WALKER: if TEST_WALKER:
......
...@@ -10,7 +10,7 @@ MUTATION_FACTOR = 0.2 # 0 <= x <= 1 ...@@ -10,7 +10,7 @@ MUTATION_FACTOR = 0.2 # 0 <= x <= 1
GAME_CANCELLED = False GAME_CANCELLED = False
LOAD_BRAIN = False LOAD_BRAIN = False
RENDER_BEST = False RENDER_BEST = False
TEST_WALKER = False TEST_WALKER = True
if TEST_WALKER: if TEST_WALKER:
LOAD_BRAIN = True LOAD_BRAIN = True
...@@ -27,8 +27,9 @@ if __name__ == '__main__': ...@@ -27,8 +27,9 @@ if __name__ == '__main__':
plt.title(f'{POP_SIZE}, {MUTATION_FACTOR}') plt.title(f'{POP_SIZE}, {MUTATION_FACTOR}')
plt.xlabel('Episodes') plt.xlabel('Episodes')
plt.ylabel('Rewards') plt.ylabel('Rewards')
plt.plot(rewards) plt.plot(rewards, label='Rewards')
plt.plot(steps) plt.plot(steps, label='Steps')
plt.legend(loc='right')
plt.savefig(f'./models/{POP_SIZE}, {MUTATION_FACTOR}.png') plt.savefig(f'./models/{POP_SIZE}, {MUTATION_FACTOR}.png')
plt.show() plt.show()
sys.exit(0) sys.exit(0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment