GithubHelp home page GithubHelp logo

robot-ants's Introduction

Robot Ants

This is a reinforcement learning demo made with Unity Machine Learning Agents.
It was insprired by ants following pheromone trails. The robot ants have an energy level which decreases over time. As long as its energy is above zero, each ant leaves a slowly evaporating trail, with individual trail point strengths matching the current energy level. Ants have to balance their behaviour between walking large distances and recharging their batteries at power-ups, spread randomly across the terrain.
The ants are controlled by two reinforcement learning agents that were trained sequentially with PPO:
The lower-tier agent ("walker") controls leg rotations and observes the ant's physics state as well as given a target direction. Training the policy was aided by imitation learning, with demonstrations generated from an oscillator driven heuristic. The agent is rewarded for its velocity in the target direction and penalized for facing away from it.
The upper-tier agent ("searcher") observes the ant's energy level and surroundings (trails, power-ups, other ants' energies) using a grid sensor. The policy's single output value serves as the target direction for the "walker" agent. The agent is rewarded for its current energy level. A waypoint queue stores a given number of agent positions over time. The squared distance between the first and last queued positions is divided by the maximum squared distance the agent can travel, the resulting ratio serves as an additional reward.

Ant Design: Ergin3D (modified) via turbosquid.

robot-ants's People

Contributors

mbaske avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

robot-ants's Issues

Python error when training

I'm really loving all your demos for ML-Agents and I'm going through all of them right now. I can't seem to train the ants though, since I'm getting the following error every time after running
mlagents-learn config/trainer_config.yaml --run-id=anttest1 --train

pythonerror

I've tried both your project with ML-Agents version 0.6 and the one from the pull request that's updated to the latest. Inference works for your .bytes files (the PR ones don't seem to be trained). But as soon as I'm trying to learn the model myself this happens after a few steps. I have not changed any settings and I'm definitely using your config file.

Any idea what the problem could be?

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.