Skip to content

grizxlyzx/soccer_offense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

soccer_offense

an easy-modified gym environment for single agent RL


A striker is getting to get the ball into the goal while a goalie is trying to prevent it from happen.


  • At start of the game, the striker and the ball randomly spawn at one side of the filed while the goalie spawns randomly at the opposite side near the goal.

  • If the ball is in certain range around striker, striker will carry the ball automatically while moving and be able to shoot. the striker can choose to shoot at either left, middle or right area of the goal, there is a small chance of missing shooting left or right, while shooting at middle will not miss.

  • The ball will be captured by goalie once the ball is close enough to the goalie, and the game is over once captured. Goalie is controlled by environment with goalie_mode deciding the behavior of the goalie.

  • The game is over once:

    • the striker runs outside the field (bad ending)
    • the ball goes outside the field (bad ending)
    • the ball is captured by goalie (bad ending)
    • the striker achieves a goal (good ending)

The agent/human player plays the striker, the first reasonable thing to learn/do is to move toward the ball and reach it, after that, the striker shall find his/her best chance to shoot and achieve a goal.

The friction slows the ball down, makes it possible that the ball stops before the goal, and may forcing the striker to learn how to bypass the goalie to get closer to the goal.

The original game is extremely reward-sparse: only get one reward at the end of the game. you can modify the reward under certain circumstances. See self._apply_rules for reward details.


Installation

cd soccer-offense
pip install  -e .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages