This is an example of a simple machine-learning algorithm. The AI's goal is to avoid the rain, it uses both positive and negative reinforcement when determining the position it will move to each round. put it in turbo mode to watch it actually learn rather than take days to learn much of anything.
This was really only made as a prototype for a machine-learning algorithm I plan on using Python or something similar to implement to be able to predict the movement of stocks.