Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in AI and Deep Learning by (50.2k points)

I am trying to build a simple evolution simulation of agents controlled by the neural networks. In the current version, each agent has a feed-forward neural net with one hidden layer. The environment contains a fixed amount of food represented as a red dot. When an agent moves, he loses energy, and when he is near the food, he gains energy. The agent with 0 energy dies. the input of the neural net is the current angle of the agent and a vector to the closest food. Every time step, the angle of movement of each agent is changed by the output of its neural net. The aim of the course is to see food-seeking behavior evolves after some time. However, nothing happens.

I don't know if the problem is the structure the neural net (too simple?) or the reproduction mechanism: to prevent population explosion, the initial population is about 20 agents, and as the population becomes close to 50, the reproduction chance approaches zero. When reproduction does occur, the parent is chosen by going over the list of agents from beginning to end, and checking for each agent whether or not a random number between 0 to 1 is less than the ratio between this agent's energy and the sum of the energy of all agents. If so, the searching is over and this agent becomes a parent, as we add to the environment a copy of this agent with some probability of mutations in one or more of the weights in his neural network.

Thanks in advance!

1 Answer

0 votes
by (108k points)

To test your model, introduce an individual with a "premade" neural network set up to steer the individual directly towards the nearest food (your model is such that such a thing exists and is reasonably easy to write down, right? If not, it's unreasonable to expect it to evolve!). Introduce that individual into your simulation amongst the dumb data(not trained). If the individual doesn't quickly dominate, it suggests your simulation isn't set up to reinforce such behavior. But if the individual enjoys reproductive success and it and its descendants take over, then your simulation is doing something right and you need to look elsewhere for the reason such behavior isn't evolving.

BTW if you haven't come across it yet and need some inspiration for this sort of project, go read: ttapress.com/553/crystal-nights-by-greg-egan 

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...