Code Monkey home page Code Monkey logo

gp's Introduction

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

gp's People

Contributors

rexim avatar t4ccer avatar yangelis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gp's Issues

Implement 'early stopping' strategies

Usually this kind of algorithm plateau in some fitness value. We could keep track of the fitness value and stop iterating when this value stop improving for a set amount of iterations.

Also would be cool to save the highest value iteration while doing that.

Improve entity lookup

Right now it's generally O(N). But I think we can get it down to O(1) with perfect hashing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.