Git Product home page Git Product logo

rl-mini-olympics's Introduction

Competition_Olympics-Integrated


Environment

Check details in Jidi Competition IJCAI-ECAI 2022 AI Qlympics Competition

Olympics-Integrated

TagsPartial Observation; Continuous Action Space; Continuous Observation Space

Introduction: Agents participate in the Olympic Games. In this series of competitions, two agents participate in different Olympics games, including running, football, table hockey, wrestling etc.

Environment Rules:

  1. This game has two sides and both sides control an elastic ball agent with the same mass and radius.
  2. Agents can collide with each other or walls, but they might lose a certain speed. The agent has its own energy, and the energy consumed in each step is directly proportional to the applied driving force and displacement.
  3. The energy of the agent recovers at a fixed rate at the same time. If the energy decays to zero, the agent will be tired, resulting in failure to apply force.
  4. The whole game contains the subgames below. In running, the goal is to reach the end as fast as possible. In football, agent needs to hit the ball through collision into opponent's goal and defend his own goal. In table-hockey, agents share the same objective as in football except that they can only move freely in our own half court. In wrestling, agent who knock others out of bounds while keeping staying in bounds wins the game.
  5. The game ends when all subgames are finished.

Action Space: Continuous, a matrix with shape 2*1, representing applied force and steering angle respectively.

Observation: A dictionary with keys 'obs' and 'controlled_player_index'. The value of 'obs' contains a 2D matrix with shape of 40x40 and other game-releated infomation. The 2D matrix records the view of agent along his current direction. Agent can see walls, marking lines, opponents and other game object within the vision area. The value of 'controlled_player_index' is the player id of the game.

Reward: Each team obtains a +1 reward when winning a subgame, and 0 reward when losing a subgame.

Environment ends condition: The game ends when all subgames are finished.

Registration: Go to (http://www.jidiai.cn/compete_detail?compete=17).

This is a POMDP simulated environment of 2D sports games where althletes are spheres and have continuous action space (torque and steering). The observation is a 30*30 array of agent's limited view range. We introduce collision and agent's fatigue such that no torque applies when running out of energy.

This is for now a beta version and we intend to add more sports scenario, stay tuned :)


Dependency

conda create -n olympics python=3.8.5

conda activate olympics

pip install -r requirements.txt


Run a game

python olympics_engine/main.py


How to test submission

You can locally test your submission. At Jidi platform, we evaluate your submission as same as run_log.py

For example,

python run_log.py --my_ai "random" --opponent "random"

in which you are controlling agent 1 which is green.


Ready to submit

Random policy --> agents/random/submission.py

rl-mini-olympics's People

Contributors

sunrisulfr avatar

Watchers

 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.