Basic code and description for GoBigger challenge 2021.

Overview

GoBigger Challenge 2021

en / 中文

Challenge Description

  • 2021.11.13 We are holding a competition —— Go-Bigger: Multi-Agent Decision Intelligence Challenge. Come and make your agents in the game!

Multi-agent confrontation is an important part of decision intelligence AI, and it is also a very challenging problem. In order to enrich the multi-agent confrontation environment, OpenDILab has developed a multi-agent confrontation competitive game, named GoBigger. Based on GoBigger, the purpose of this challenge is to explore the research of multi-agent games and promote the training of technical talents in the fields of decision intelligence, so as to create a "global leading", "original" and "open" decision intelligence AI open source technology ecosystem.

This challenge needs competitors to submit their agents. We will return the score for agents to help competitors have a more correct understanding of the performance of the submitted agent. At the end of the challenge, we will fully test all submissions and the final ranking of the participating teams will be conducted.

Specific Task

This challenge uses Go-Bigger as the game environment. Go-Bigger is a multi-players competitive environment. For more details, please refer to the Go-Bigger documentation. In the match, each team participating in the challenge controls one team in the game (each team consists of multiple players). Contest participating teams need to submit an agent to control a certain team in the match and the players it contains, and obtain higher scores through teamwork, thereby achieving a higher ranking in the match.

Submission

Here in submit, we provide examples of submission for all teams in our challenge. We also provide BaseSubmission, and participants should implements their owned submission based on the code.

class BaseSubmission:

    def __init__(self, team_name, player_names):
        self.team_name = team_name
        self.player_names = player_names

    def get_actions(self, obs):
        '''
        Overview:
            You must implement this function.
        '''
        raise NotImplementedError

Note that all submission should extend with BaseSubmission. We will provide team_name and player_names for each submission as their basic parameters. team_names means the name of team which this submission controls. We also know that there are several players in a team, which is relative with the player_names in the parameters. We will call get_actions() when we try to get actions from this submission. So that participants should implements get_actions() in their submission. This function will receive obs as its parameters, which is similar with what we provide in tutorial. For example, submissions will get obs as following:

global_state, player_state = obs

global_state in details:

{
    'border': [map_width, map_height], # the map size
    'total_time': match_time, # the duration of a game
    'last_time': last_time,   # the length of time a game has been played
    'leaderboard': {
        team_name: team_size
    } # the team with its size in this game
}

Participants can find their team_name in submission matched with the team_name in leaderboard.

player_state in details:

{
    player_name: {
        'feature_layers': list(numpy.ndarray), # features of player
        'rectangle': [left_top_x, left_top_y, right_bottom_x, right_bottom_y], # the vision's position in the map
        'overlap': {
            'food': [[position.x, position.y, radius], ...], 
            'thorns': [[position.x, position.y, radius], ...],
            'spore': [[position.x, position.y, radius], ...],
            'clone': [[[position.x, position.y, radius, player_name, team_name], ...],     
        }, # all balls' info in vision
        'team_name': team_name, # the team which this player belongs to 
    }
}

However, we will only provide the submission with the player_state matched with its players. That means, if player_a and player_b (both are player name) are in the team belongs to this submission, and player_c not belongs to this team, participants will only get player_a and player_b in the submission.

After getting the obs, submissions should return actions in get_actions(). actions should look like:

{
    player_a: actions_a,
    player_b: actions_b
}

Remember that both player_a and player_b should be the name in your submission's player_names. And actions_a should be a list, which contains there items, which are the same with what we propose in action-space.

Examples and Test

We provide RandomSubmission and BotSubmission. RandomSubmission provide actions randomly, and BotSubmission provide actions based on a script. Both of them could be an example of your submission. More details in code.

We also provide an example for the pipeline of the submission. Please refer to submission_example for more details. You can also develop your agent in this directory. Once you finish your my_submission.py, you can call python -u test.py to check your submission and finally get the .tar.gz file to upload.

Supplements

If you want to add other things in your submission, such as model checkpoints or any other materials, please place them in ./supplements and tar them with submission.

Finally

You should place all your code and materials under my_submission/. Use tar zcf submission.tar.gz my_submission/ to get your final submission files. The final submission.tar.gz should be:

    - my_submission
    | - __init__.py
    | - requirements.txt
    | - my_submission.py
    | - supplements/
        | - checkpoints or other materials

Attention: __init__.py should be an empty file.

Try your first submission

Maybe you are not very familiar with our competition, but don't worry, we provide the simplest case submission! Try the following code to quickly generate a my_submission.tar.gz for submission!

$ cd submit/submission_example
$ python -u test.py

The above test.py will check whether your submission is correct. If it is correct, you will get the following output:

Success!
###################################################################
#                                                                 #
#   Now you can upload my_submission.tar.gz as your submission.   #
#                                                                 #
###################################################################

Now you only need to submit your my_submission.tar.gz!

  • Note: This submission is made of a random policy. You can check the code and change the policy to get better performance.

Submission based on DI-engine

We also develop submission_example_di based on DI-engine. You can place your ckpt in supplements to get a completed submission.

Resources

You might also like...
Backend Interview Challenge

Inspect HOA backend challenge This is a simple flask repository with some endpoints and requires a few more endpoints. It follows a simple MVP (model-

Here You will Find CodeChef Challenge Solutions
Here You will Find CodeChef Challenge Solutions

Here You will Find CodeChef Challenge Solutions

A curses based mpd client with basic functionality and album art.
A curses based mpd client with basic functionality and album art.

Miniplayer A curses based mpd client with basic functionality and album art. After installation, the player can be opened from the terminal with minip

Simple GUI menu for micropython using a rotary encoder and basic display.

Micropython encoder based menu This is a simple menu system written in micropython. It uses a switch, a rotary encoder and an OLED display.

A basic DIY-project made using Python and MySQL

Banking-Using-Python-MySQL This is a basic DIY-project made using Python and MySQL. Pre-Requisite needed:-- MySQL command Line:- creating a database

Minutaria is a basic educational Python timer used to learn python and software testing libraries.
Minutaria is a basic educational Python timer used to learn python and software testing libraries.

minutaria minutaria is a basic educational Python timer. The project is educational, it aims to teach myself programming, python programming, python's

The purpose is to have a fairly simple python assignment that introduces the basic features and tools of python

This repository contains the code for the python introduction lab. The purpose is to have a fairly simple python assignment that introduces the basic

A basic python project which replicates the functionalities on an 8 Ball.
A basic python project which replicates the functionalities on an 8 Ball.

Magic-8-Ball To the people who wish to make decisions using a Magic 8 Ball but can't get one? I gotchu. This is a basic python project which replicate

basic tool for NFT. let's spam, this is the easiest way to generate a hell lotta image

NFT generator this is the easiest way to generate a hell lotta image buckle up and follow me! how to first have your image in .png (transparent backgr

Comments
  • I use tensorboard --logdir=logs to view training information and real-time training

    I use tensorboard --logdir=logs to view training information and real-time training

    Error: Traceback (most recent call last): File "E:\software\Anconada\envs\gobiggermaster\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "E:\software\Anconada\envs\gobiggermaster\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "E:\software\Anconada\envs\gobiggermaster\Scripts\tensorboard.exe_main.py", line 7, in File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\tensorboard\main.py", line 64, in run_main app.run(tensorboard.main, flags_parser=tensorboard.configure) File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\absl\app.py", line 312, in run _run_main(main, args) File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\absl\app.py", line 258, in _run_main sys.exit(main(argv)) File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\tensorboard\program.py", line 220, in main server = self._make_server() File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\tensorboard\program.py", line 302, in _make_server return self.server_class(app, self.flags) File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\tensorboard\program.py", line 392, in init return cls(wsgi_app=wsgi_app, flags=subflags) File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\tensorboard\program.py", line 425, in init super(WerkzeugServer, self).init(host, port, wsgi_app) File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\werkzeug\serving.py", line 740, in init HTTPServer.init(self, server_address, handler) File "E:\software\Anconada\envs\gobiggermaster\lib\socketserver.py", line 456, in init self.server_bind() File "E:\software\Anconada\envs\gobiggermaster\lib\site-packages\tensorboard\program.py", line 500, in server_bind super(WerkzeugServer, self).server_bind() File "E:\software\Anconada\envs\gobiggermaster\lib\http\server.py", line 138, in server_bind self.server_name = socket.getfqdn(host) File "E:\software\Anconada\envs\gobiggermaster\lib\socket.py", line 673, in getfqdn hostname, aliases, ipaddrs = gethostbyaddr(name) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte

    opened by Gj-12222 2
  • There may be a mistake   [I'm not sure]

    There may be a mistake [I'm not sure]

    Thanks for your work. There may be a mistake in function _to_raw_action(act: int).

        if direction == 0:
            x, y = 0, 1
        elif direction == 1:
            x, y = 0, -1
    

    Maybe it should be:

        if direction == 0:
            x, y = 0, -1
        elif direction == 1:
            x, y = 0, 1
    
    opened by yizhangliu 1
  • fix tensor error

    fix tensor error

    1. raw_overlap['clone'] is used by BotAgent. In collector, there is no "to_tensor", but in evaluator, there is "to_tensor" , So we need to adopt this method( int(torch.Tensor())) to unify them.
    bug 
    opened by jayyoung0802 0
  • 请问一下这个提供的例子是不是不兼容新版本的DI-engine

    请问一下这个提供的例子是不是不兼容新版本的DI-engine

    没有办法复现,提示 Traceback (most recent call last): File "gobigger_selfplay_baseline_main.py", line 15, in from envs import GoBiggerEnv File "..\envs_init_.py", line 1, in from .gobigger_env import GoBiggerEnv File "..\envs\gobigger_env.py", line 8, in from ding.envs import BaseEnv, BaseEnvTimestep, BaseEnvInfo ImportError: cannot import name 'BaseEnvInfo' from 'ding.envs' (C:\Users\abc\Anaconda3\envs\qiuqiu\lib\site-packages\ding\envs_init_.py)

    注释掉BaseEnvInfo和相关方法会提示 Traceback (most recent call last): File "C:\Users\abc\Anaconda3\envs\qiuqiu\lib\site-packages\ding\envs\env_manager\base_env_manager.py", line 111, in init self._observation_space = self._env_ref.observation_space AttributeError: 'GoBiggerEnv' object has no attribute 'observation_space'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "gobigger_selfplay_baseline_main.py", line 106, in main(main_config) File "gobigger_selfplay_baseline_main.py", line 55, in main env_fn=[lambda: GoBiggerEnv(collector_env_cfg) for _ in range(collector_env_num)], cfg=cfg.env.manager File "C:\Users\abc\Anaconda3\envs\qiuqiu\lib\site-packages\ding\envs\env_manager\subprocess_env_manager.py", line 216, in init super().init(env_fn, cfg) File "C:\Users\abc\Anaconda3\envs\qiuqiu\lib\site-packages\ding\envs\env_manager\base_env_manager.py", line 120, in init self._env_ref.reset() File "..\envs\gobigger_env.py", line 69, in reset self._env = self._launch_game() File "..\envs\gobigger_env.py", line 61, in _launch_game server.start() AttributeError: 'Server' object has no attribute 'start'

    opened by atiyit 1
Owner
OpenDILab
Open sourced Decision Intelligence (DI), powered by SenseTime X-Lab & Shanghai AI Lab
OpenDILab
A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.

██████╗ ██╗██████╗ ███████╗██╗ ██╗███╗ ██╗███████╗ ██████╗ ██╔══██╗██║██╔══██╗██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝ ██████╔╝██║██████╔╝█

Julian Kemmerer 391 Jan 1, 2023
A example project's description is a high-level overview of why you’re doing a project.

A example project's description is a high-level overview of why you’re doing a project.

Nikita Matyukhin 12 Mar 23, 2022
A step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.

This project has a step-by-step tutorial for how to work with some of the most basic features of Nav2 using a Jupyter Notebook in a warehouse environment to create a basic application.

Steve Macenski 49 Dec 22, 2022
The code for 2021 MGTV AI Challenge Anti Stealing Link, and the online result ranks 10th.

赛题介绍 芒果TV-第二届“马栏山杯”国际音视频算法大赛-防盗链 随着业务的发展,芒果的视频内容也深受网友的喜欢,不少视频网站和应用开始盗播芒果的视频内容,盗链网站不经过芒果TV的前端系统,跳过广告播放,且消耗大量的服务器、带宽资源,直接给公司带来了巨大的经济损失,因此防盗链在日常运营中显得尤为重要

tongji40 16 Jun 17, 2022
This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021.

BrightNetworkUK-GCC-2021 This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021. Language used here is py

Dareer Ahmad Mufti 28 May 23, 2022
This repository requires you to solve a problem by writing some basic python code.

Can You Solve a Problem? A beginner friendly repository that requires you to solve familiar problems with python. This could be as simple as implement

Precious Kolawole 11 Nov 30, 2022
Google Foobar challenge solutions from my experience and other's on the web.

Google Foobar challenge Google Foobar challenge solutions from my experience and other's on the web. Note: Problems indicated with "Mine" are tested a

Islam Ayman 6 Jan 20, 2022
A repository containing useful resources needed to complete the SUSE Scholarship Challenge #UdacitySUSEScholars #poweredbySUSE

SUSE-udacity-cloud-native-scholarship A repository containing useful resources needed to complete the SUSE Scholarship Challenge #UdacitySUSEScholars

Nandini Proothi 11 Dec 2, 2021
Submission to the HEAR2021 Challenge

Submission to the HEAR 2021 Challenge For model evaluation, python=3.8 and cuda10.2 with cudnn7.6.5 have been tested. The work uses a mixed supervised

Heinrich Dinkel 10 Dec 8, 2022
Stori QA Automation Challenge

Stori-QA-Automation-Challenge This is the repository is created for the Stori QA Intern Automation Engineer Challenge! In this you can find the Requir

Daniel Castañeda 0 Feb 20, 2022