Giter VIP home page Giter VIP logo

gym_rem2d's Introduction

Robotics, Evolution and Modularity (REM) 2D

This is a fork from the original version developed by Frank Veenstra. This version is intended to be used with py_asynch_ea (link)

This version also include some cleaning.

Note that at this stage the code still needs some cleaning. (You will also find some hardcoded hacks in there) It should be straightforward to install the requirements and run the Demo.

See our paper for more information on the project. You can use the following bibtex to cite the project in your publication:

@article{doi:10.1162/isal\_a\_00295,
author = {Veenstra, Frank and Glette, Kyrre},
title = {How Different Encodings Affect Performance and Diversification when Evolving the Morphology and Control of 2D Virtual Creatures},
journal = {Artificial Life Conference Proceedings},
volume = {},
number = {32},
pages = {592-601},
year = {2020},
doi = {10.1162/isal\_a\_00295},
URL = { https://www.mitpressjournals.org/doi/abs/10.1162/isal_a_00295 },
eprint = { https://www.mitpressjournals.org/doi/pdf/10.1162/isal_a_00295 }
}

A similar 3D modular environment that uses a direct encoding can be found here. We are working on a framework that allows us to use the same encodings to evolve both 2D and 3D modular robots. Stay tuned.

Background information

This project has been created to investigate how different type of encoding strategies (or genotype-to-phenotype mappings) can be used to create and use evolutionary algorithms to evolve 2D virtual creatures. Four types of encodings have been used to create the virtual creatures that each have a lot of tunable parameters: A direct encoding, and three types of generative encodings. The generative encodings use are an L-System, a compositional pattern producing network (CPPN) and a cellular encoding. A direct encoding contains all the information necessary for creating all the components of the robot. The generative encodings are recursively called and thereby reuse genetic information. Therefore, direct encodings allow for a more tunable robot that don't change much when mutated, whereas changes in the direct encoding can lead to drastic changes in the robot's phenotype. See our paper for more information on the project.

The image below shows a virtual creature generated by the L-System. The colors of the components represent the 'symbols' from which the genetic information of a particular component is derived. Similarly colored components were expressed by the same genetic information.

Example modular robot

Example

Here is an example code snippet from one of the demo scripts to create a random individual using a specific encoding

if __name__=="__main__":
    # Change the encoding by altering the argument passed to the random function
    n_iterations = 200 
    for i in range(n_iterations):
        individual = r2d.Individual.random(encoding = 'lsystem') # options: direct, cppn, ce, lsystem
        evaluate(individual, headless = False, controller = None)

Please don't hesitate to contact me if you'd like some explanation or have a suggestion.

gym_rem2d's People

Contributors

frankveenstra avatar lenilegoff avatar dependabot[bot] avatar

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.