Giter Site home page Giter Site logo

unitytechnologies / machinelearningroguelike Goto Github PK

View Code? Open in Web Editor NEW
435.0 37.0 83.0 3.94 MB

A small Roguelike game that uses Machine Learning to power its entities. Originally used in talks by Ciro & Alessia.

License: Other

C# 99.88% ShaderLab 0.12%
machine-learning reinforcement-learning ai 2d intermediate cinemachine unity

machinelearningroguelike's Introduction

Machine Learning Roguelike

MLRoguelike

Description

A small Roguelike game that uses Machine Learning to power its entities. Both the player and its enemies are ML Agents, and the demo is a good playground to test Machine Learning in a real game environment. A scene specifically for training is included, to demonstrate how to train the agents in a different environment than the one where the game is going to happen. This demo also features the use of Cinemachine for 2D and Tilemap.

Originally used in Codemotion (Milan) and DevGAMM (Minsk) talks by Ciro Continisio & Alessia Nigretti.

Documentation

Objective

This project is intended to demonstrate a practical application of the Machine Learning Agents in a real game.

Usage instructions

Please note that this project is using v0.2.1d of Unity ML-Agents.

To try out the project, you need to add the Tensorflow Sharp plugin to your Assets folder. More information on how to set up Tensorflow Sharp Support is provided here.
To be able to train the agents, make sure that the Python API is installed in your system. This is a guide on how to do it. Then, add the python folder from the Machine Learning Agents repository to the project (outside the Assets folder).

Refer to the Machine Learning Agents wiki for further instructions on how to set up the project for external training.

Extra Materials

Information on how this project was created is available on the blog post.
Slides: Link.
Talk video: Link.

Software Requirements

Required: Unity 2017.2, or later version

Hardware Requirements

Required: Any computer (Win or Mac)

Owner and Responsible Devs

Owners: Alessia Nigretti ([email protected]), Ciro Continisio ([email protected]) Original graphics: Michele "Buch" Bucelli on OpenGameArt under CC0 License

Major Change Log

  • 24 Oct: Created repository
  • 14 Nov: First real working copy
  • 27 Nov: Updated for public use, added license, Readme
  • 11 Dec: Repository is public

machinelearningroguelike's People

Contributors

alessia96 avatar ccontinisio avatar ciro-unity 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  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  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

machinelearningroguelike's Issues

Outdated Version

Is there a updated version of this project? Since tensorflow and JSON.NET are giving problem, it should be a nice practice with updated version.

KeyError:'logPath'

When I use the Jupyter Notebook or just run the ppo.py script from cmd with the --train flag I receive a KeyError:logPath error. How do I go about fixing this? I can do all the ML v0.2 examples just fine and never encountered this.
Thanks!

`---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
in ()
----> 1 env = UnityEnvironment(file_name=env_name, curriculum=curriculum_file)
2 print(str(env))
3 brain_name = env.external_brain_names[0]

~\Documents\MachineLearningRoguelike-master\python\unityagents\environment.py in init(self, file_name, worker_id, base_port, curriculum)
120 self._global_done = None
121 self._academy_name = p["AcademyName"]
--> 122 self._log_path = p["logPath"]
123 self._brains = {}
124 self._brain_names = p["brainNames"]

KeyError: 'logPath'`

Some broken links in readme

A few links in your main setup tutorial have rotted, like "Tensorflow Sharp plugin" and "python folder". Thanks for making this demo available!

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.