Git Product home page Git Product logo

hybrid-nca-evocraft's Introduction

Open-ended creation of hybrid creatures with Neural Cellular Automata

Hybrids

This is our submission to the Minecraft Open-endedness challenge 2021 for the Gecco conference.

Description

Our algorithm is based on Neural Cellular Automata (NCA), a CA-based neural network model inspired by morphogenesis. We chose to work with cellular automata, as we're interested in models where complexity can be spontaneously increasing over time, which is a property that traditional models (like neural networks) do not have. We train a NCA to grow different patterns from various seeds (or "genomes") in 2 or 3 dimensions. Once the training is done, we load the model in Minecraft and have players modify the genomes. They can be mutated or merged to create an endless stream of novel growing patterns. The resulting patterns depend both on the genome and the growth rules learned offline by the NCA, which can be unpredictable and surprising.

The repository contains link to pre-trained models in 2D and 3D as well as Colab notebooks links to train you own NCA.

The current codebase is very simplistic and therefore not very usable, because that's only what I needed to run my experiments and try several things. I plan to make it more usable in the near future.

Usage

Make sure you have the right Python packages installed. The project uses Poetry, so you only need to do poetry install if you have it.

Otherwise pip install -r requirements.txt should work too.

Make also sure that you have installed the Evocraft Python interface to Minecraft and your Minecraft server is started with java -jar spongevanilla-1.12.2-7.3.0.jar.

The Pytorch models are defined in evo_ca/models.py.

To run a 2D model in Minecraft, use python run_2d.py <PATH>. For a 3D version use python run_3d.py <PATH>, replacing <PATH> with a path to your model weights.

Model weights

Pre-trained models

The pre-trained weights are in a zip archive that you can download here. Unzip the archive in the repo root.

Train your own

You can also train your own models with different target patterns in both 2D and 3D in the Colab notebooks

2D Model

Colab link

3D Model

Colab link

hybrid-nca-evocraft's People

Contributors

dependabot[bot] avatar hugcis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.