Genetic-Programming-Predator-Prey-Simulation

所属分类:人工智能/神经网络/深度学习
开发工具:GDScript
文件大小:35KB
下载次数:0
上传日期:2020-02-17 17:12:06
上 传 者sh-1993
说明:  no intro
(A small and chaotic Genetic Programming simulation of a Predator Prey system, using Godot Engine.)

文件列表:
LICENSE (1079, 2020-02-18)
Trees.txt (499, 2020-02-18)
actors (0, 2020-02-18)
actors\Actor.gd (3629, 2020-02-18)
actors\Actor.scn (553, 2020-02-18)
actors\Actors_Tileset.scn (849, 2020-02-18)
actors\Fox.scn (759, 2020-02-18)
actors\Pheromon.gd (266, 2020-02-18)
actors\Pheromon.scn (516, 2020-02-18)
actors\Pheromon_Fox.scn (573, 2020-02-18)
actors\Pheromon_Rabbit.scn (641, 2020-02-18)
actors\Rabbit.scn (760, 2020-02-18)
actors\Tileset.scn (630, 2020-02-18)
actors\Tree.gd (142, 2020-02-18)
actors\Tree.scn (635, 2020-02-18)
data_structures (0, 2020-02-18)
data_structures\stree_controller.gd (11322, 2020-02-18)
engine.cfg (255, 2020-02-18)
export.cfg (7774, 2020-02-18)
global.gd (365, 2020-02-18)
icon.png (2736, 2020-02-18)
icon.png.flags (18, 2020-02-18)
icons (0, 2020-02-18)
icons\fox.png (164, 2020-02-18)
icons\fox_pher.png (114, 2020-02-18)
icons\grass.png (98, 2020-02-18)
icons\rabbit.png (165, 2020-02-18)
icons\rabbit_pher.png (113, 2020-02-18)
icons\tree.png (192, 2020-02-18)
main.gd (1571, 2020-02-18)
main.scn (4551, 2020-02-18)
simulations (0, 2020-02-18)
simulations\Simulation_RabbitRace.gd (6831, 2020-02-18)
simulations\Simulation_RabbitRace.scn (4171, 2020-02-18)
simulations\actors_tileset.res (1377, 2020-02-18)
simulations\tileset.res (578, 2020-02-18)

# Genetic Programming Predator Prey Simulation A small and chaotic Genetic Programming simulation of a Predator Prey system, using Godot Engine. The idea of the initial simulation was to explore a simple Predator and Prey environment using pheromones as a "hunting" mechanic - blue icons are the Rabbits, Red icons are the foxes. ## How to play the simulation To play the simulation, you'll need the Godot engine (http://godotengine.org/). 1. Clone this repository. 2. Open the project with the Godot engine. 3. Play the project (F5). The simulation window should open then. To start the simulation, press the "Play" button under the "Simulation Speed" label, on the side menu. The simulation will happen on the screen to the right. The simulation characteristics (including Genetic settings, such as Mutation probability, and if either Foxes or Rabbits are going to evolve on the next generation) can be changed on-the-fly. To check the Genetic-Programming generated on each generation, press the "Save trees in txt" button, and check the generated "Trees.txt" file generated on the Project folder. ## About the "Rabbit Race" simulation In this initial simulation, the "objective" of the Rabbits is to reach the top of the screen (preferably without getting caught by the foxes), while the objective of the foxes is to hunt the biggest number of rabbits possible in the time limit (50 turns is the default). Usually, what it can be observed is that the rabbits stay as simpletons for a long time (because its very possible that at least one rabbit reach the top of the screen by simply moving forward, and therefore it is probably going to be the parent during the Fitness selection phase), while the foxes stay as simpletons during the first generations (usually under 50), until the mutation chance triggers a behavior that is responsible in "eating" a rabbit - then the foxes starts to get increasily complex, but under a very big variation (since this is a small and chaotic simulation). ## How the Genetic-Programming works This simulation uses a full-tree generation to produce the initial random children, and for each generation, a simple Fitness-proportional selection is used to choose the parents that are going to participate in the Crossover reproduction. The entire Genetic trees are just a String, in which the operations are performed using Godots GDScript. One should be able to easily change the simulation and Fitness method for other tree-based Genetic-Programming simulations on the "Simulation_RabbitRace.gd". All the Genetic Programming algorithm and Syntax tree is built on the "stree_controller.gd" script (Syntax Tree Controller, the singleton responsible in controlling all Syntax tree pools and Genetic operators).

近期下载者

相关文件


收藏者