📄 readme
字号:
agent himself is not a member of this class.- AgentObject: subclass of the PlayerObject class which contains information about the agent himself. It adds attributes denoting the stamina, view angle and view quality of the agent to the information provided by the PlayerObject class.BasicPlayer===========This class defines the various skills than an agent can perform. The way inwhich these skills are executed depends on the current state of the world model.PlayerSettings==============This class contains parameters which are used in the BasicPlayer class. Anexample of such a parameter is `dPassEndSpeed' which denotes the desired endspeed of the ball when it is passed to a teammate. By changing the values of theparameters in this class it is possible to adapt the behavior of theBasicPlayer.Player======This class is a subclass of the BasicPlayer class that contains methods forreasoning about the best possible action in a given situation. Action selectionis based on the most recent information about the state of the world as obtainedfrom the WorldModel and on the role of the agent in the current team formation.For making the final decision on whether a particular type of action should beperformed, the agent uses the parameter values which are specified in thePlayerSettings class.Formations==========This class contains information about possible team formations as well as amethod for determining a strategic position on the field. Formations are readfrom a configuration file (formations.conf) and are based on those used by theSimple Portugal team. The implementation is spread over three separate classes:- PlayerTypeInfo: contains information about a player type in a formation.- FormationTypeInfo: contains information about one specific formation.- Formations: contains information about all the possible team formations and stores the currently used formation. This class is accessible from the WorldModel class.GenericValues=============This class is a superclass for all classes that contain settings from thePlayerSettings and ServerSettings classes. Using this class it is possible tolink variables to (text) names. When these names with their associated valuesare read from (or written to) a file, the corresponding variables can be easilyset. Logger======This class is used by all the other classes to log various kinds of informationfor debugging purposes. It allows the programmer to specify the level ofabstraction (`loglevel') from which he desires debugging information andcontains an output stream for writing (usually a file). All log information thatis sent to the Logger has a number which is compared to the specified log level(or range of log levels) to determine whether the information should be printedor discarded. It is also possible to log the information together with a timestamp. This time stamp corresponds to the time that has elapsed since a timerwas last restarted. This timer is represented by an object from the Timing classwhich is also defined in the file `Logger.C'.Timing======This class contains a timer and methods for restarting this timer and fordetermining the amount of wall clock time that has elapsed since the timer wasstarted. It is mainly used for the timing of incoming messages from the serverand for debugging purposes.Parse=====This class contains several static methods for parsing string messages. Thesemethods can skip characters up to a specified point and convert parts of astring to integer or double values. They are mainly used by the SenseHandlerthat handles the processing of messages from the soccer server.ServerSettings==============This class contains all the server parameters which are used for the currentversion of the soccer server (8.x). Examples are the maximum speed of a player(player_speed_max) and the stamina increase per cycle (stamina_inc_max). Whenthe agent is initialized, the server sends him a message containing the valuesfor these parameters. This message is then parsed using the methods from theParse class and the resulting values are stored in ServerSettings. SoccerTypes===========This class contains enumerations for different soccer types that are used in thesimulation. It creates an abstraction for using soccer-related concepts(playmodes, referee messages, etc.) in a clean and consistent way throughout thecode. Furthermore, this class contains methods for converting parts of stringmessages received from the server to the corresponding soccer types (e.g.`(g l)' to `GOAL_LEFT').SoccerCommands==============This class holds all the necessary information for creating a soccer commandthat can be sent to the server. It contains variables denoting the possiblearguments (angle, power, etc.) of the different soccer commands and stores thetype of the current command. Only those variables which are related to thecurrent type will get a legal value. Furthermore, the class contains a methodfor converting the command into a string message that will be accepted by thesoccer server. The definition of this class can be found in the file`SoccerTypes.C'.Time====This class holds the server time in the form of an ordered pair (t,s) where tdenotes the current server cycle and s is the number of cycles since the clockhas stopped. Here the value of t equals that of the time stamp contained in thelast message received from the server, whereas the value for s will always be 0while the game is in progress. It is only during dead ball situations (e.g. freekicks) that this value will be different, since in these cases the server timewill stop while cycles continue to pass (i.e. actions can still be performed).Representing the time in this way has the advantage that it allows the playersto reason about the number of cycles between events in a meaningful way. Thedefinition of this class can be found in the file `SoccerTypes.C'.Geometry========This class contains several static methods for performing geometricalcalculations and is mainly used by the BasicPlayer for working out actiondetails. Methods have been defined for dealing with (possibly infinite)geometric series and for working with the abc-formula. Note that the`Geometry.C' file also contains several goniometric functions which enable oneto specify angles in degrees rather than in radians.VecPosition===========This class contains the representation of a position (x,y) and defines severalmethods which operate on this position in different ways. Methods are definedfor relatively comparing positions (e.g. `isBehind', `isBetween', etc.) and forconverting relative positions to global positions and vice versa. This classalso allows you to specify positions in polar coordinates (r,phi) and containsa method for converting polar coordinates (r,phi) to Cartesian coordinates(x,y). Furthermore, the standard arithmetic operators have been overloaded forpositions. The definition of this class can be found in the file`SoccerTypes.C'.Line====This class contains the representation of a line: ax + by + c = 0. It allows oneto specify a line in different ways: by providing three values (a, b and c), bygiving two points on the line, or by specifying a single point on the linetogether with an angle. Furthermore, this class contains methods for determiningthe intersection point of two lines and for determining a line perpendicular tothe current line that goes through a given point. The definition of this classcan be found in the file `SoccerTypes.C'.Circle======This class contains the representation of a circle and contains methods thatdeal with circles. A circle is specified by a VecPosition object which denotesits center and by a value denoting its radius. Methods have been defined forcomputing the area and circumference of the circle and for determining theintersection points of two circles as well as the size of their intersectionarea. The definition of this class can be found in the file `SoccerTypes.C'.Rectangle=========This class contains the representation of a rectangle and contains methods thatdeal with rectangles. A rectangle is specified by two VecPosition objectsdenoting the upper left corner and bottom right corner respectively. The mostimportant method in this class determines whether a given point lies inside thecurrent rectangle. The definition of this class can be found in the file`SoccerTypes.C'.The main file============= In the file `main.C' all the different classes are initialized and linked afterwhich the player mainloop is called. A single execution of this loop is asfollows:- block until new sensory information is received- tell the WorldModel to update all the information using the latest message from the server- determine the best possible action in the form of a skill from the BasicPlayer class- send an action command which is part of this skill to the ActHandlerThis loop is called in each cycle after a sense_body or see message is received.After a sense_body message a new action is determined based on a prediction ofthe current world state, whereas after a see message a new action is chosenbased on the new visual information. In each case the action is put in theActHandler queue. In this way the ActHandler will always contain an action evenwhen no visual information arrived during a cycle. When visual information doesarrive the action determined after the sense message arrival can be optimizedbased on the new information, but this is not necessary.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -