Giter Site home page Giter Site logo

seanedwards / evolutionary-turtles Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 176 KB

Logo-esque turtles that can reproduce and adapt to their changing environment. This code is here to demo my own work in the computer science program at the University of Maine, and may not be used in any way that would violate academic integrity policies.

License: MIT License

Java 100.00%

evolutionary-turtles's Introduction

RabbitTurtles implements a genetic algorithm to simulate a simple life form 
("rabbit turtles") in a world of limited resources. The name of the project
comes from the name of the assignment, which was to adapt a Logo-esque turtles
library into a simulation of organisms ("rabbits") consuming food (grass) in
the turtle world.

This project ignores most of the given assignment, and instead implements
a genetic algorithm for rabbit survival. Turtles wander randomly and consume
food at a constant rate. The selection function is starvation. When turtles have
sufficient excess energy, they reproduce asexually. A turtle's offspring 
receives a mutation of its own genes, and a percentage of its own stored energy.

A turtle's genome consists of the following genes:

- Appetite: The rate at which the turtle consumes food that it's standing on.

- Reproduction: The amount of energy required for the turtle to create an 
                offspring.

- Reproduction Ratio: The percentage of the turtle's own energy that is given
                      to the offspring.

- Speed: The turtle's rate of travel. Turtles always move at a constant speed.

- Lifetime: The maximum amount of time a turtle may live. When a turtle hits
            its lifetime, it dies of "old age".

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.