[Jais-checkins] jaisteam/src/jais/world WorldActionInformInterface.java,1.3,1.4 WorldDataAccessInter
Status: Beta
Brought to you by:
maestrodd
Update of /cvsroot/jais/jaisteam/src/jais/world
In directory usw-pr-cvs1:/tmp/cvs-serv32242/world
Modified Files:
WorldActionInformInterface.java WorldDataAccessInterface.java
WorldModel.java WorldUpdateInterface.java xWorldModel.java
Log Message:
added muchos vielos tabulatoros... jb 7.0 is really fine ;)
changed the handling of the enemy and own team lists:
the list is fetched at the beginning of the KI cycle and stored in an
internal reference (m_enemyTeam m_ownTeam).
Index: WorldActionInformInterface.java
===================================================================
RCS file: /cvsroot/jais/jaisteam/src/jais/world/WorldActionInformInterface.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WorldActionInformInterface.java 7 Jul 2002 20:01:36 -0000 1.3
--- WorldActionInformInterface.java 13 Jul 2002 16:21:52 -0000 1.4
***************
*** 10,48 ****
{
/**
! * this method should inform the world about a catchBall action send to the server from the KI
! * @param f_angle
! */
! public void informCatchBall(double f_angle);
! /**
! * this method should inform the world about a dash action send to the server from the KI
! * @param f_power
! */
! public void informDash(double f_power);
! /**
! * this method should inform the world about a kick action send to the server from the KI
! * @param f_power
! * @param f_angle
! */
! public void informKick(double f_power, double f_angle);
! /**
! * this method should inform the world about a turnNeck action send to the server from the KI
! * @param f_angle
! */
! public void informTurnNeck(double f_angle);
! /**
! * this method should inform the world about a move action send to the server from the KI
! * @param f_x
! * @param f_y
! */
! public void informMove(double f_x, double f_y);
! /**
! * this method should inform the world about a turn action send to the server from the KI
! * @param f_angle
! */
! public void informTurn(double f_angle);
}
--- 10,48 ----
{
/**
! * this method should inform the world about a catchBall action send to the server from the KI
! * @param f_angle
! */
! public void informCatchBall(double f_angle);
! /**
! * this method should inform the world about a dash action send to the server from the KI
! * @param f_power
! */
! public void informDash(double f_power);
! /**
! * this method should inform the world about a kick action send to the server from the KI
! * @param f_power
! * @param f_angle
! */
! public void informKick(double f_power, double f_angle);
! /**
! * this method should inform the world about a turnNeck action send to the server from the KI
! * @param f_angle
! */
! public void informTurnNeck(double f_angle);
! /**
! * this method should inform the world about a move action send to the server from the KI
! * @param f_x
! * @param f_y
! */
! public void informMove(double f_x, double f_y);
! /**
! * this method should inform the world about a turn action send to the server from the KI
! * @param f_angle
! */
! public void informTurn(double f_angle);
}
Index: WorldDataAccessInterface.java
===================================================================
RCS file: /cvsroot/jais/jaisteam/src/jais/world/WorldDataAccessInterface.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** WorldDataAccessInterface.java 7 Jul 2002 22:24:16 -0000 1.7
--- WorldDataAccessInterface.java 13 Jul 2002 16:21:52 -0000 1.8
***************
*** 13,171 ****
public interface WorldDataAccessInterface
{
! /**
! * gives the simulation cycle in which we are
! * @return int cycle
! */
! public int sorry_whatTimeDoWeHave();
! /**
! * gives the playerinfos about the enemys
! * @return Arraylist playerinfos
! * @roseuid 3CE8BBA70270
! */
! public ArrayList getEnemyPlayers();
! /**
! * gives the playerinfos about our team
! * @return ArrayList playerinfos
! * @roseuid 3CE8BBB401E3
! */
! public ArrayList getFriendlyPlayers();
! /**
! * gives the playmode in which we are
! * @return int playmode
! * @roseuid 3CE8BBBF03DD
! */
! public int getPlaymode();
! /**
! * gives the last SenseBodyInfo we get
! * @return SenseBodyInfo
! * @roseuid 3CE8BBC80047
! */
! public SenseBodyInfo getSenseBodyInfo();
! /**
! * gives the last BallInfo we get
! * @return BallInfo
! * @roseuid 3CE8BBDC0028
! */
! public BallInfo getBall();
! /**
! * gives the last Playerinfo about our agent
! * @return Playerinfo
! * @roseuid 3CE8BBE10061
! */
! public PlayerInfo getMyself();
! /**
! * gives the last RefereeMessage that arrived (blocks until there was one)
! * @return AurealInfo RefereeMessage
! */
! public AurealInfo getLastRefereeMessage();
! /**
! * gives the last SayMessage from a player that arrived
! * @return AurealInfo SayMessage
! */
! public AurealInfo getLastPlayerMessage();
/**
! * gives the last SayMessage from our coach that arrived
! * @return AurealInfo SayMessage
! */
! public AurealInfo getLastCoachMessage();
! /**
! * says if we play on leftside or rightside
! * @return true for left, false for right
! */
! boolean isPlayingLeft();
! /**
! * gives the absolute viewAngle from our Agent to the x-Axis
! * @return double viewAngle in degrees
! */
! public double getAbsViewAngle();
! /**
! * gives the absolute bodyDirection from our Agent to the x-Axis
! * @return double bodyDirection in degrees
! */
! public double getAbsBodyDir();
! /**
! * gives the angle from our bodyDirection to an object
! * @param f_obj is the object to which we want our BodyDirection
! * @return double bodyDirection in degrees
! */
! public double getBodyDirectionTo(ObjectInfo f_obj);
/**
! * gives the angle from our bodyDirection to an object
! * @param f_obj is the coordinate to which we want our BodyDirection
! * @return double bodyDirection in degrees
! */
! public double getBodyDirectionTo(Coordinate f_obj);
! /**
! * gives the angle from our neck to our body
! * @return double neckDirection in degrees
! */
! public double getNeckDirection();
! /**
! * gives the distance from our agent to coordinates
! * @param f_coord
! * @return double MyDistanceTo
! */
! public double getMyDistanceTo(Coordinate f_coord);
! /**
! * gives the distance from our agent to an object
! * @param f_object
! * @return double MyDistanceTo
! */
! public double getMyDistanceTo(ObjectInfo f_object);
! /**
! * gives the viewMode
! * @return String viewMode
! */
! public String getViewMode();
! /**************************************************************************************************/
/* Here follow methods provided for the visualization of our WorldModel
! /**************************************************************************************************/
! /**
! * gives the flags we saw this round (without them we used for calculating our Position)
! * @return LinkedList seenFlags
! */
! public LinkedList getCurrentylSeenFlags();
/**
! * gives the flags we used this round for calculating our Position
! * @return LinkedList usedFlags
! */
! public LinkedList getCurrentylUsedFlags();
! /**
! * gives the lines we saw this round
! * @return LinkedList seenLines
! */
! public LinkedList getCurrentylSeenLines();
! /**
! * gives the lines we used this round for calculating our Position
! * @return LinkedList usedLines
! */
! public LinkedList getCurrentylUsedLines();
! /**
! * gives the goals we saw this round
! * @return LinkedList seenGoals
! */
! public LinkedList getCurrentylSeenGoals();
! }
--- 13,171 ----
public interface WorldDataAccessInterface
{
! /**
! * gives the simulation cycle in which we are
! * @return int cycle
! */
! public int sorry_whatTimeDoWeHave();
! /**
! * gives the playerinfos about the enemys
! * @return Arraylist playerinfos
! * @roseuid 3CE8BBA70270
! */
! public ArrayList getEnemyPlayers();
! /**
! * gives the playerinfos about our team
! * @return ArrayList playerinfos
! * @roseuid 3CE8BBB401E3
! */
! public ArrayList getFriendlyPlayers();
! /**
! * gives the playmode in which we are
! * @return int playmode
! * @roseuid 3CE8BBBF03DD
! */
! public int getPlaymode();
! /**
! * gives the last SenseBodyInfo we get
! * @return SenseBodyInfo
! * @roseuid 3CE8BBC80047
! */
! public SenseBodyInfo getSenseBodyInfo();
! /**
! * gives the last BallInfo we get
! * @return BallInfo
! * @roseuid 3CE8BBDC0028
! */
! public BallInfo getBall();
! /**
! * gives the last Playerinfo about our agent
! * @return Playerinfo
! * @roseuid 3CE8BBE10061
! */
! public PlayerInfo getMyself();
! /**
! * gives the last RefereeMessage that arrived (blocks until there was one)
! * @return AurealInfo RefereeMessage
! */
! public AurealInfo getLastRefereeMessage();
! /**
! * gives the last SayMessage from a player that arrived
! * @return AurealInfo SayMessage
! */
! public AurealInfo getLastPlayerMessage();
/**
! * gives the last SayMessage from our coach that arrived
! * @return AurealInfo SayMessage
! */
! public AurealInfo getLastCoachMessage();
! /**
! * says if we play on leftside or rightside
! * @return true for left, false for right
! */
! boolean isPlayingLeft();
! /**
! * gives the absolute viewAngle from our Agent to the x-Axis
! * @return double viewAngle in degrees
! */
! public double getAbsViewAngle();
! /**
! * gives the absolute bodyDirection from our Agent to the x-Axis
! * @return double bodyDirection in degrees
! */
! public double getAbsBodyDir();
! /**
! * gives the angle from our bodyDirection to an object
! * @param f_obj is the object to which we want our BodyDirection
! * @return double bodyDirection in degrees
! */
! public double getBodyDirectionTo(ObjectInfo f_obj);
/**
! * gives the angle from our bodyDirection to an object
! * @param f_obj is the coordinate to which we want our BodyDirection
! * @return double bodyDirection in degrees
! */
! public double getBodyDirectionTo(Coordinate f_obj);
! /**
! * gives the angle from our neck to our body
! * @return double neckDirection in degrees
! */
! public double getNeckDirection();
! /**
! * gives the distance from our agent to coordinates
! * @param f_coord h
! * @return double MyDistanceTo
! */
! public double getMyDistanceTo(Coordinate f_coord);
! /**
! * gives the distance from our agent to an object
! * @param f_object h
! * @return double MyDistanceTo
! */
! public double getMyDistanceTo(ObjectInfo f_object);
! /**
! * gives the viewMode
! * @return String viewMode
! */
! public String getViewMode();
! /**************************************************************************************************/
/* Here follow methods provided for the visualization of our WorldModel
! /**************************************************************************************************/
! /**
! * gives the flags we saw this round (without them we used for calculating our Position)
! * @return LinkedList seenFlags
! */
! public LinkedList getCurrentylSeenFlags();
/**
! * gives the flags we used this round for calculating our Position
! * @return LinkedList usedFlags
! */
! public LinkedList getCurrentylUsedFlags();
! /**
! * gives the lines we saw this round
! * @return LinkedList seenLines
! */
! public LinkedList getCurrentylSeenLines();
! /**
! * gives the lines we used this round for calculating our Position
! * @return LinkedList usedLines
! */
! public LinkedList getCurrentylUsedLines();
! /**
! * gives the goals we saw this round
! * @return LinkedList seenGoals
! */
! public LinkedList getCurrentylSeenGoals();
! }
\ No newline at end of file
Index: WorldModel.java
===================================================================
RCS file: /cvsroot/jais/jaisteam/src/jais/world/WorldModel.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** WorldModel.java 8 Jul 2002 06:37:55 -0000 1.55
--- WorldModel.java 13 Jul 2002 16:21:52 -0000 1.56
***************
*** 16,53 ****
public class WorldModel implements WorldUpdateInterface, WorldDataAccessInterface, WorldActionInformInterface
{
! private static Logger logger=Logger.getLogger("jais.world"); // get our logger
! protected BallInfo m_ball; // where the ball is stored
! private String m_teamName; // where the teamName is stored
! private int m_playerNumber; // where the playerNumber is stored
! private final int FORGET_TIME= 1*10; // x-seconds
! private final double NOT_MOVING=0.01; // if deltaVector is smaller than we say Object did not move
[...1746 lines suppressed...]
! * Sets a whole ObjectInfo list to visible true or false
! * @param f_objectInfoList list to modify
! * @param f_isVisible set visibility of the Objects in list to true or false
! * @return the given List with all objectInfos in it with isVisible()==f_isVisible
! */
! private ArrayList setVisible(ArrayList f_objectInfoList, boolean f_isVisible)
! {
ObjectInfo l_object;
int l_index;
for (ListIterator it=f_objectInfoList.listIterator();it.hasNext();)
{
! l_index=it.nextIndex();it.next();
! l_object=(ObjectInfo)f_objectInfoList.get(l_index);
! l_object.setVisible(f_isVisible);
! f_objectInfoList.set(l_index,l_object);
}
return f_objectInfoList;
! }
! }
\ No newline at end of file
Index: WorldUpdateInterface.java
===================================================================
RCS file: /cvsroot/jais/jaisteam/src/jais/world/WorldUpdateInterface.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WorldUpdateInterface.java 7 Jul 2002 20:01:37 -0000 1.3
--- WorldUpdateInterface.java 13 Jul 2002 16:21:52 -0000 1.4
***************
*** 11,39 ****
public interface WorldUpdateInterface
{
! /**
! * determs the type of sender and stores the AurealInfo in the corresponding list
! * @param f_hearEvent
! * @roseuid 3CE8BB580190
! */
! public void updateAurealInfo(HearEvent f_hearEvent);
! /**
! * determs the type of object and stores the VisualInfo in the corresponding list
! * @param f_visualEvent
! * @roseuid 3CE8BB6E020A
! */
! public void updateVisualInfo(VisualEvent f_visualEvent);
! /**
! * stores the SenseBodyInfo in the corresponding list
! * @param f_senseBodyEvent
! * @roseuid 3CE8BB8401D0
! */
! public void updateSenseBodyInfo(SenseBodyEvent f_senseBodyEvent);
! /**
! * initialized playingside, backnumber and playmode
! * @param f_InitialEvent
! */
! public void updateInitInfo(InitialEvent f_InitialEvent);
! }
--- 11,39 ----
public interface WorldUpdateInterface
{
! /**
! * determs the type of sender and stores the AurealInfo in the corresponding list
! * @param f_hearEvent hghg
! * @roseuid 3CE8BB580190
! */
! public void updateAurealInfo(HearEvent f_hearEvent);
! /**
! * determs the type of object and stores the VisualInfo in the corresponding list
! * @param f_visualEvent
! * @roseuid 3CE8BB6E020A
! */
! public void updateVisualInfo(VisualEvent f_visualEvent);
! /**
! * stores the SenseBodyInfo in the corresponding list
! * @param f_senseBodyEvent
! * @roseuid 3CE8BB8401D0
! */
! public void updateSenseBodyInfo(SenseBodyEvent f_senseBodyEvent);
! /**
! * initialized playingside, backnumber and playmode
! * @param f_InitialEvent
! */
! public void updateInitInfo(InitialEvent f_InitialEvent);
! }
\ No newline at end of file
Index: xWorldModel.java
===================================================================
RCS file: /cvsroot/jais/jaisteam/src/jais/world/xWorldModel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** xWorldModel.java 7 Jul 2002 20:01:37 -0000 1.3
--- xWorldModel.java 13 Jul 2002 16:21:52 -0000 1.4
***************
*** 9,19 ****
public class xWorldModel extends Throwable
{
! /**
! * @roseuid 3CEB62610320
! * @param f_message
! */
! public xWorldModel(String f_message)
! {
super(f_message);
! }
! }
--- 9,19 ----
public class xWorldModel extends Throwable
{
! /**
! * @roseuid 3CEB62610320
! * @param f_message
! */
! public xWorldModel(String f_message)
! {
super(f_message);
! }
! }
\ No newline at end of file
|