Developer's Guide
Submitted by yuz on Sun, 2005-09-11 23:50.
Environment
TOS is OS independent, TOS development is also OS independent, tools we use:
- General Development Tools
- SSH is used by a CVS client to access the TOS CVS respository on sourceforge. On Linux machine, Open SSH is usually pre-installed.For win32 platform, you may get a non-commercial version at http://www.ssh.com/.
- VIM is used for source code editing.
- CVS is used for version control. You may also want to get some fancy GUI CVS at http://www.wincvs.org/.
- Development Tools for Java Version
TOS Server Architecture
![]() |
TOS Server has five main classes.
- SoccerWorld: represents the state of TOS environment. A soccer field, two teams of players, one group of viewers and a ball.
- Host: a thread waits for connection requests and actions from agents.
- HeartOfWorld: a thread calculates and gives each agent its percept, updates the SoccerWorld at every simulation step.
- SoccerRules: simulates and calculates the soccer rules, such as off-side, goal scores.
- SoccerPhysics: simulates the movement of player and the ball.
TOS runs on internet using the client-server architecture.
- TOS simulator runs as the server to provide percepts to the agents and receives actions from them on the internet.
- TOS agents run as the clients to receives percepts from the server and send actions to the server on the internet.
- Percepts and actions are encoded as LISP-like text messages, packed and transmitted as UDP/IP packets between the server and client.
- A client can be implemented in any language. A Java client can use built-in API soccer.common to communicate with the server.
- There are two types of TOS clients (agents), Player and Viewer.
TOS GUI Architecture
![]() |
- SoccerMaster can be run in three modes.
- In the VIEW mode, it connects to the server as a viewer client. The user observes two AI teams play against each other.
- In the PLAY mode, it connects to the server as a player client. The user plays the game himself.
- In the REPLAY mode, it reads a log file and redisplays the match. The user reexamines a recorded match.
- The user can hot-switch Java2D and Java3D view any time, no application restart is needed.
Suggestions, Ideas and Bug Tracking at
TOS project page at sourceforge.net
- Printer-friendly version
- Login to post comments



