Player based on evolutionary algorithm, with average score of around 7.8 ± 0.89#5
Merged
rougier merged 1 commit intorougier:masterfrom Aug 19, 2025
Merged
Conversation
…nd some reservoir dynamics
Owner
|
Many thanks for your entry. I'll merge it and evaluate it using a new random seed. From your description of performances, I fear the bot might have learned to turn on a specific direction which might explain why you oscillate between very poor and very good performances. Did you have a chance to observe its behavior ? Note also that since you've made this first entry and if you found interesting structures inside your model, you can freeze thes structures and re-use them for a new entry. |
Owner
|
I ran with debug and the bot is circling the outer loop which is a goo strategy even though it is not optimal. On my machine, training last 2.36 seconds such that there is still plenty of time to improve behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have tried many different approaches and hyperparameters to end up handing in a rather simple model ;)
So the algorithm to find the optimal parameters / weights in
Woutis quite generic and follows the setup of :Source: https://en.wikipedia.org/wiki/Evolutionary_algorithm
So I begin by generating
min(cpu_count(), 8) * 3individualWout, withnp.random.uniform(-1, 1, (1, 1000))and use the best performing individuals, then some crossover (taking weights from both "parents") and mutation (adding "variation" withnp.random.normal) to create the next generation.This is pretty simple and thus only performs good around half the time.
To speed things up I have used multiprocessing and for the evaluation of the population I'm using a handcrafted reward function, which discourages hitting the wall and encourages "movement", by visiting many locations and both energy sources plus gaining energy in general, especially when running low on energy.
Most parameters are chosen reasonably, eg.
leak = 0.8,spectral_radius = 0.95anddensity = 0.1, but if any questions arise for any specific choice, I'm happy to answer.I tested some random seeds and got an average of
7.8 ± 0.89with the highest being13.32 ± 0.37and the lowest1.53 ± 0.19, so because of the short training time and not that efficient optimisation algorithm, the random seed has a big influence on the final performance, so its a bit of playing roulette and I'm curious to see what seed you will pick for evaluation ;)Anyways, I think this can be a good baseline to beat for other people as well, I'm looking forward to seeing other solutions and thanks for the fun challenge!