Giter Site home page Giter Site logo

smartmaatt / ml-agents-points-collection Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20.59 MB

MLAgents project enables the creation of AI agents using reinforcement learning techniques. It features a pre-configured mechanism for agents and a gaming environment where they learn and perform tasks.

License: MIT License

C# 12.45% ShaderLab 74.58% HLSL 12.97%
mlagents reinforcement-learning unity

ml-agents-points-collection's Introduction

ML-Agents Points Collection

OverviewScreenshotsRequirementsInstallationLicense

Overview

The ml-agents-points-collection project is a simple game system developed in the Unity engine, enhanced with the dedicated ML-Agents plugin. This project enables the creation of AI agents using reinforcement learning techniques. It features a pre-configured mechanism for agents and a gaming environment where they learn and perform tasks. The agents are placed on platforms where objects containing negative and positive points spawn randomly. The AI's goal is to collect 5 positive points. Collecting a negative point decreases the score by -1, while a positive point increases it by +1. The agent wins by achieving a score of 5 points and loses if its score falls below 0 or if it falls off the platform.

Agent Mechanics

  • Agents are aware of their relative position, their current score, and the position of each point on their platform.
  • Information provided to the agents is normalized according to the observation creation conventions outlined in the ML-Agents documentation.
  • The system includes a mechanism for manual agent control.

Training and Models

  • The system is capable of training any number of agents simultaneously, where the results and observations of each agent contribute to a common model.
  • A pre-trained model is included for testing, and the system also supports training from scratch.

Playing the Game

The game can be played in two modes:

  1. AI Mode: The pre-trained or newly trained AI agents will navigate the platforms and try to achieve the goal.
  2. Manual Mode: Manually control an agent using the built-in control system.

Screenshots

Game Learning process for nine agents simultaneously.

Requirements

  • Unity Version: Unity 2020.3.48f1
  • After installing the appropriate Unity version, a Python virtual environment must be created using the provided requirements.txt file.

Installation

  1. Install Unity version 2020.3.48f1 from the official Unity website.
  2. Clone the ml-agents-points-collection repository to your local machine.
  3. Set up a Python virtual environment:
python -m venv [env_name]
source [env_name]/bin/activate # On Unix or MacOS
[env_name]\Scripts\activate # On Windows
pip install -r requirements.txt
  1. Open the project in Unity.
  2. Configure the system to your liking according to the guide in the documentation. [LINK]

License

This project is licensed under the MIT License - see the LICENSE file for details.


© 2023 Mateusz Płonka (SmartMatt). All rights reserved.

PortfolioGitHubLinkedInYouTubeTikTok

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.