Commit 81e22acf authored by gem2578's avatar gem2578 Committed by Marcus M. Scheunemann

Added more docs

parent 92a4965a
# Python Cup
## Team
> Team(Side)
This is based on Daniel Polani PythoCup
#### put()
> put(Brain, pos) -> None
PythoCup is a python-based simple simulator to study several aspects of the 2D RoboCup scenario without the hassle of understanding the detailed synchronization and command model of the standard 2D simulator. It simplifies many aspects, does not include turns, currently does not implement noise, outs (field boundaries) and many other features, and has been developed on-the-fly for the purpose of an quick-access to 2D RoboCup scenarios.
## Side
- LEFT
- RIGHT
#### other()
> other() -> Side
## ObjectType
- BALL
- GOAL
- PLAYER
## CupObject
- type -> ObjectType
- pos -> Vector2
- side -> Side
## Brain
- pos -> Vector2
- ball -> CupObject
- self_goal -> CupObject
- other_goal -> CupObject
- self_team -> [CupObject, ...]
- other_team -> [CupObject, ...]
#### sorted_object()
> sorted_object() -> [CupObject, ...]
#### action()
> action() -> Vector2 , Vector2
## pythocup
#### run()
> run(Team(LEFT), Team(RIGHT)) -> None
## Prerequirements
- Python 3
- Pygame 1.9.3
# Exercise
## Preliminaries
git clone the repository
## Tasks
1. Run `sample.py`
2. Write an agent that stays on the spot.
3. Write an agent that moves towards the ball.
4. Write an agent that moves towards the ball and kicks it towards the opponent goal.
5. Do the same thing for an agent that is on the wrong side of the ball; i.e. include a trip around the ball.
6. Create an agent that tries to put itself between the agent from above and its own goal, to block the kicks
## Advanced Task
Try to write an agent that supports the attacker (or the defender) of the last exercise.
# Useful Classes
## Team
> Team(Side)
#### put()
> put(Brain, pos) -> None
## Side
- LEFT
- RIGHT
#### other()
> other() -> Side
## ObjectType
- BALL
- GOAL
- PLAYER
## CupObject
- type -> ObjectType
- pos -> Vector2
- side -> Side OR None
## Brain
- pos -> Vector2
- ball -> CupObject
- self_goal -> CupObject
- other_goal -> CupObject
- self_team -> [CupObject, ...]
- other_team -> [CupObject, ...]
#### sorted_object()
> sorted_object() -> [CupObject, ...]
#### action()
> action() -> Vector2 , Vector2
## pythocup
#### run()
> run(Team(LEFT), Team(RIGHT)) -> None
## Vector2
docs: https://www.pygame.org/docs/ref/math.html#pygame.math.Vector2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment