Giter Club home page Giter Club logo

evoluting-life-java's Introduction

Evoluting Life

This application is an experiment to train robots to travel without colliding. To achieve this, it uses a Genetic Algorithm and a basic neural network. The fitness of a robot is determined by large distance and few collisions. The application van run as a simulation as well as on a raspberry-pi.

Build

To build this application using a Terminal, navigate to the root of this project. Make sure you have installed Maven and type:

mvn clean package

Running the simulation

To run this application as a simulation using a Terminal, navigate to the target sub folder and type:

java -jar evoluting-life-java-<version>-jar-with-dependencies.jar

Where the -placeholder needs to be replaced by the current version.

Running on a Raspberry-Pi

Prerequisites

pi4j

To control the pins on your Raspberry-Pi, this application uses the pi4j library. The library needs to be installed on your Raspberry-Pi. You can find instructions here: Install pi4j

ServoBlaster

To control the servo that holds and turns the sensor, the application uses ServoBlaster. This repository contains a servoBlaster.sh which should be started on the Raspberry-Pi before starting the application.

runRobot

To start the application in a convenient way, it is recommended to copy the runRobot.sh file in this repository to your Raspberry-Pi.

The application

Also copy the application 'evoluting-life-java--jar-with-dependencies.jar' that was previously build to your Raspberry-Pi.

Pin setup

The pin numbering of wiringpi wil be used in this description and in code. Visit Raspberry Pi Pinout for reference. The following pins are used for running the application on the Raspberry-Pi:

  • GPIO_07 : Servo (output)
  • GPIO_10 : Sensor echo (input)
  • GPIO_14 : Sensor trigger (output)
  • GPIO_23 : Left motor forward (output, hard PWM)
  • GPIO_25 : Left motor reverse (output, soft PWM)
  • GPIO_26 : Right motor forward (output, hard PWM)
  • GPIO_28 : Right motor reverse (output, soft PWM)
  • GPIO_29 : Led (output)

Structure of the code

The green colored boxes represent classes that are part of the core and are used in both simulation and on the Raspberry-Pi. The orange colored boxed represent classes that are used for the simulation only. The grey colored boxes represent classes that are used on the Raspberry-Pi only. The red lines represent a dependency that is used to report velocity, position, collision etc. to the SimRobot class.

Class Diagram

evoluting-life-java's People

Contributors

coilz avatar kverhoef avatar g-a-verbeek avatar hansriezebos avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar Luc Hondshorst avatar

Forkers

erikderoos coilz

evoluting-life-java's Issues

Omgeving aanpassen

  • Niet eten
  • Niet botsen belonen of bestraffen
  • Muur is een botsing, i.p.v. dood

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.