/gp

Just a Playground Repo for my Genetic Programming experiments

Primary LanguageCMIT LicenseMIT

Genetic Programming

Just a Playground Repo for my Genetic Programming experiments. I have no prior exprience with Genetic Programming and Algorithms.

demo

Idea

  • Write a simple game where agents are trying to survive in an environment fighting for food and with each other.
  • The behaviour of a single agent is described with a Turing machine style state machine that we call Chromosomes.
  • Use Genetic Algorithms to find an optimial behaviour that survives the longest.

Environment

TBD

Entities

TBD

Agents

State

TBD

Action

TBD

Chromosomes

TBD

Dependencies

Should be available on Windows, MacOS, and the majority of Linux distros.

Quick Start

$ make
$ ./gp_trainer 69 ./output.bin
$ ./gp_simulator ./output.bin

gp_trainer

Lets you select agents over several generations in a batch mode. The results can be simulated and inspected by gp_simulator and gp_inspector.

gp_simulator

Lets you interactively step through the simulation of the generation produced by gp_trainer.

Controls

Keyboard

Key Action
r Generate completely new state of the game
n Make a new generation based on the best performing agents
SPACE Step the state of the game

Mouse

  • Clicking on agents (red triangles) dumps their state to stdout

gp_inspector

Lets you inspect generations produced by gp_trainer.

References