Skip to content

Commit

Permalink
Merge branch 'release/v0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
chshong committed Aug 6, 2019
2 parents 8c80849 + 8090aea commit 37312a9
Show file tree
Hide file tree
Showing 176 changed files with 2,956 additions and 18,744 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 AI World Cup

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
51 changes: 29 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# AI World Cup Simulation

The AI World Cup simulation environment for usage in local PCs. Participants of [AI World Cup](http://aiworldcup.org) can download the program to develop their own algorithm for AI Soccer, AI Commentator, or AI Reporter. After development, participants of [AI World Cup](http://aiworldcup.org) can upload their algorithm online and test against others' on server provided by us. The online simulation running on our server for test matches can be used through [AI World Cup Web Simulator page](http://aiworldcup.org/web-si). As the qualifying/main rounds will be run in a same environment with the web simulation, please make sure that the developed program works in the web simulator.
The AI World Cup simulation environment. Participants of [AI World Cup](http://aiworldcup.org/) can download the program to develop their own algorithm for AI Soccer, AI Commentator, or AI Reporter. After development, participants of AI World Cup can submit their programs to [[email protected]]([email protected]). We will check if your program runs correctly on our server where the qualifying/main rounds will be run and reply back as soon as possible. Regarding the deadlines, please refer to our [AI World Cup Website](http://aiworldcup.org/).

- There are two ways to download the AI World Cup simulation program.
- AI World Cup simulation program requires Webots Robot Simulator. Please refer to Webots official website's [installation procedure](https://www.cyberbotics.com/doc/guide/installation-procedure) to install Webots.
- Downloading ZIP file through 'Download ZIP' will not work. It does not download the submodules related to the program.
- AI World Cup simulation program requires Webots Robot Simulator. Please refer to Webots official website's [installation procedure](https://www.cyberbotics.com/doc/guide/installation-procedure) to install Webots (Webots version should be R2019b).
- **Downloading the ZIP file through 'Download ZIP' will not work.** It does not download the submodules related to the program.

**How to download the simulation program**

Method 1. Go to [releases](https://github.com/aiwc/test_world/releases) and download the latest version (test_world.v0.5.zip).
Method 1. Go to [releases](https://github.com/aiwc/test_world/releases) and download the latest version.

Method 2. Use following git command

## Windows only. Carriage return will invalidate simulation files.
git config --global core.autocrlf false

## Both Linux and Windows
git clone https://github.com/aiwc/test_world.git --recurse-submodules

**How to run the simulation program**
Expand All @@ -24,37 +20,48 @@ Please refer to the [Wiki pages](https://github.com/aiwc/test_world/wiki).

**Descriptions**

**controllers**: Contains programs for managing AI World Cup simulation system **(Programs in this directory are managed by us and must not be modified)**
**controllers**: Contains programs for managing AI World Cup simulation game system **(You can modify the controllers to aid your development. However, the games at the competition will use the default controllers)**

- soccer_robot: Program that changes robot wheel movements based on received data
- soccer_robot: A program that changes robot wheel movements based on received data

- supervisor: Referee program that manages AI Soccer game
- supervisor: A referee program that manages AI World Cup games as whole (Participant programs communicate with this program to control the robots/make comments/submit a report)

**examples**: Contains sample programs participants can refer to **(Participants may implement AI programs referring to the sample programs provided in this directory)**

- common: Contains a basic interface for information handling and communication with the simulation program
- common: Contains a basic interface for C++ information handling and communication with the simulation program

- extlibs: Contains external libraries used in sample programs

- (role-prefix)_data: Directories where participants' program may write some files into if needed
- team_a_data, team_b_data, commentator_data, and reporter_data: Directories where participants' program may write some files into if needed

- Remaining directories contain samples participants can refer to.

- general_check-variables: A program that prints game information variables sent from the simulation program to participants program

- general_frame-skip: A program that implements framing skipping. Frame skipping is advised when your program takes more than 50 ms in each game frame in generating the output control signal

- general_image-fetch: A program that shows the game image frames using OpenCV

- player_deep-learning-play and player_deep-learning-train: Programs that implement a base skeleton for AI Soccer deep learning using Deep-Q-Network (DQN)

- player_random-walk: An AI Soccer program that simply sets robot wheel speeds to random value in each game frame

- player_rulebased-A, player_rulebased-B: Programs that implement a rule-based control of a team in AI Soccer ('rulebased-B' is a simplified version of 'rulebased-A')

- Remaining directories contain samples participants can refer to. The sample directory names follow format '(role-prefix)_(program-description)_(programming_language)'.
- player_skeleton: A base skeleton for AI Soccer program

- (role-prefix): AI Soccer (player), AI Commentator (commentator), AI Reporter (reporter), general (Examples that may help participants from all three competitions)
- (program-description): Brief description of what the program does
- (programming_language): Programming language used in the example. Currently, we have examples for C++ (cpp) and Python (py).
- commentator_skeleton: A base skeleton for AI Commentator program

**extlibs**: Contains external libraries used in AI World Cup simulation **(Files in this directory are managed by us and must not be modified)**
- reporter_skeleton: A base skeleton for AI Reporter program

**plugins**: Contains a physics plugin used for ball-robot collision detection **(Files in this directory are managed by us and must not be modified)**
**extlibs**: Contains external libraries used in AI World Cup simulation

**protos**: Contains AI World Cup object models (robot, ball, stadium, etc.) **(Files in this directory are managed by us and must not be modified)**
**plugins**: Contains a physics plugin used for ball-robot collision detection

**reports**: If AI World Cup simulation is run with an AI Reporter, the report will be stored in this directory after the game. The created file's name will be (reporter team name specified in config.json).txt. **(Only related to AI Reporters)**
**protos**: Contains AI World Cup object models (robot, ball, stadium, etc.)

**worlds**: Contains AI World Cup simulation world files **(Files in this directory can be run using Webots Robot Simulator)**

- aiwc.wbt: Webots world file
- aiwc_simple.wbt: A simplified version of aiwc.wbt without visual decorations (stadium, grass field, etc.). This world can be run faster than aiwc.wbt without any differences in data observed by the participant's AI program.

**config.json**: Configuration file for setting player executables, setting game duration, and setting some rules on/off for effective training. Please refer to the [Wiki page](https://github.com/aiwc/test_world/wiki/How-to-use-AI-World-Cup-simulation-program) for parameter descriptions **(Participants should modify the player information in this file to tell the simulation which program to execute)**
21 changes: 12 additions & 9 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
{
"rule": {
"game_time": 300,
"deadlock": true,
"goal_area_foul": true,
"penalty_area_foul": true
"deadlock": true
},
"team_a": {
"name": "teamA",
"executable": "examples/player_rulebased_py/player_rulebased.py",
"executable": "examples/player_rulebased-A_py/player_rulebased-A.py",
"datapath": "examples/team_a_data"
},
"team_b": {
"name": "teamB",
"executable": "examples/player_rulebased_py/player_rulebased.py",
"executable": "examples/player_rulebased-B_py/player_rulebased-B.py",
"datapath": "examples/team_b_data"
},
"commentator": {
"name": "commentator",
"executable": "",
"datapath": "../../examples/commentator_data"
"executable": "examples/commentator_skeleton_py/commentator_skeleton.py",
"datapath": "examples/commentator_data"
},
"reporter": {
"name": "reporter",
"executable": "",
"datapath": "../../examples/reporter_data"
"executable": "examples/reporter_skeleton_py/reporter_skeleton.py",
"datapath": "examples/reporter_data"
},
"tool": {
"repeat": false,
"record": false,
"record_path": ""
}
}
4 changes: 2 additions & 2 deletions controllers/soccer_robot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ include $(WEBOTS_HOME_PATH)/resources/Makefile.include
# Following lines need os detection
ifneq ($(OSTYPE),windows)
# need >=boost-1.64. use bundled boost for systems that has lower version of boost
CFLAGS += -I ../../extlibs/boost-1.65.1/include
LFLAGS += -L ../../extlibs/boost-1.65.1/lib/$(OSTYPE)
INCLUDE += -I ../../extlibs/boost-1.65.1/include
LIBRARIES += -L ../../extlibs/boost-1.65.1/lib/$(OSTYPE)
BOOST_POSTFIX =
else
# webots for windows contains boost
Expand Down
Binary file modified controllers/soccer_robot/soccer_robot
Binary file not shown.
Binary file removed controllers/soccer_robot/soccer_robot.exe
Binary file not shown.
Binary file removed controllers/supervisor/.supervisor.exe.signature
Binary file not shown.
Binary file removed controllers/supervisor/.supervisor.signature
Binary file not shown.
6 changes: 3 additions & 3 deletions controllers/supervisor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ include $(WEBOTS_HOME_PATH)/resources/Makefile.include
# Following lines need os detection
ifneq ($(OSTYPE),windows)
# need >=boost-1.64. use bundled boost for systems that has lower version of boost
CFLAGS += -I ../../extlibs/boost-1.65.1/include
LFLAGS += -L ../../extlibs/boost-1.65.1/lib/$(OSTYPE)
INCLUDE += -I ../../extlibs/boost-1.65.1/include
LIBRARIES += -L ../../extlibs/boost-1.65.1/lib/$(OSTYPE)
BOOST_POSTFIX =
else
# webots for windows contains boost
Expand All @@ -36,4 +36,4 @@ BOOST_POSTFIX = -mt
endif

LIBRARIES += -lboost_system$(BOOST_POSTFIX) -lboost_thread$(BOOST_POSTFIX) -lboost_filesystem$(BOOST_POSTFIX) -lboost_random$(BOOST_POSTFIX)
LFLAGS += -L ../../extlibs/bonefish/lib/$(OSTYPE)
LIBRARIES += -L ../../extlibs/bonefish/lib/$(OSTYPE)
Loading

0 comments on commit 37312a9

Please sign in to comment.