Slither.io-bot
Slither.io-bot copied to clipboard
Evolution rating for each version
Hey guys, so I've been thinking.
When it comes right down to it, what are we trying to make here? The answer: a bot. And what do we really want that bot to do? Answer: be as long as possible.
We want the bot to be able to get as long as possible.
How will we know if we have made progress? My idea: create a second script (named evolutiontest.js
) that does a few simple things:
- Once initiated manually, start the bot with uniform settings (Settings agreed to be standard.) and disable player controls.
- Run the bot like normal, until death, where it records the maximum length (and possibly survival time) to a list.
- Repeat several times to get an accurate feel of a real survival situation. (My statistics experience tells me we will need at least 30 trials to be able to use the central limit theorem and outweigh outliers.)
- After the trials are completed, record the data to the github comment being tested. (Include average length, avg lifetime, avg FPS , browser). This step will be posted to Github manually.
With this process, I feel like we can verify if a commit had a negative effect on the performance of the bot where it really matters: its efficiency.
maybe the second version slimmed ?
Sounds like we really need this done soon so we can add it to the PR approvals workflow.
Honestly, getting this in opens a huge avenue for things like genetic algorithms, which, in my opinion, are amazing.
@dracco1993 I would think a machine learning algorithm would be more advisable. Given the design of a genetic algorithm the goal of the snake is to become larger of which is not a predefined method. It requires a sense of intelligence. By using a machine learning algorithm it can slowly learn how close is too close, how far from the center is good, maybe what constitutes a good goal for food and many other variables that can be questionably assigned. Another does side to a genetic algorithm is I would say performance. If the genetic algorithm is used for route planning, as that being the only implementation in which I see it able to be applied to, it would have to re-evolve after every state change.
http://synaptic.juancazala.com/ http://cs.stanford.edu/people/karpathy/convnetjs/ javascript neural network libraries