ProgrammierMethodik 2002 - RoboCup

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

RCBrain Class Reference

Inheritance diagram for RCBrain::

RCGoalieBrain List of all members.

Public Methods

double getAngleToPoint (double x, double y)
 calculates the angle between the players direction and a given point. More...

boolean searchBall ()
 Operation. More...

boolean inField (double x, double y)
 determines if the given point is in the players field. More...

int update ()
 every cycle called by the main loop. More...

 RCBrain (RCWorld World, RCCommunicator Communicator)
 constructor of RCBrain. More...


Protected Methods

double gauss (double x, double m, double sigma)
 the gauss function. More...

double dashPower (double distance)
 calculates the dash power in terms of the run distance. More...

double kickPower (double distance)
 calculates the kick power in terms of the shoot distance. More...

double calcDist (double x1, double y1, double x2, double y2)
 calculates the distance between 2 points ("pythagoras"). More...

boolean isBetween (double value, double bound1, double bound2)
 determines if value is between bound1 and bound2. More...

RCPartner getPassPartner ()
 determines a pass partner for the player. More...

boolean shoot ()
 Operation. More...

int dribbleToGoal ()
 Operation. More...


Protected Attributes

RCWorld World
 Associations. More...

RCCommunicator Communicator
double myX
double myY
final double NEAR_BALL = 4.5
final double MAX_KICK_DIST = .7
final double NEAR_BORDER = 2.
final double NEAR_GOAL = 53.
final double MAX_PASS_DIST = 70.
final double MIN_PASS_DIST = 4.
final double BEST_PASS_DIST = 15.
final double BARRIER_ANGLE = 2.5
final double MIN_LIKELIHOOD_PASS = 0.25
final double MIN_LIKELIHOOD_GOAL = 0.2
final double POWER_COEFF_DASH = 30.
final double MIN_POWER_DASH = 80
final double POWER_COEFF_KICK = 120.
final double MIN_RUN_DIST = 1.5
final double HALF_OF_GOALWIDTH = 7.
final double MAX_ANGLE = 7.
final double SEARCH_ANGLE = 40.
final double PRECISION = 0.001
final double GOAL_X = 52.5
final double GOAL_Y = 0.
final double KICK_POWER_DIRBBLE = 20.
final double DASH_POWER_DRIBBLE = 55.
final double MAX_POWER_KICK = 100.
final int MAX_TIME = 10

Constructor & Destructor Documentation

RCBrain::RCBrain ( RCWorld World,
RCCommunicator Communicator ) [inline]
 

constructor of RCBrain.

Parameters:
World  
Communicator  

Definition at line 690 of file RCBrain.java.


Member Function Documentation

double RCBrain::calcDist ( double x1,
double y1,
double x2,
double y2 ) [inline, protected]
 

calculates the distance between 2 points ("pythagoras").

Parameters:
x   value of point 1
y   value of point 1
x   value of point 2
y   value of point 2

Returns:
returns the distance between the two points

Definition at line 222 of file RCBrain.java.

Referenced by dribbleToGoal(), getPassPartner(), shoot(), RCGoalieBrain::update(), and update().

double RCBrain::dashPower ( double distance ) [inline, protected]
 

calculates the dash power in terms of the run distance.

Parameters:
distance  

Definition at line 186 of file RCBrain.java.

Referenced by dribbleToGoal(), RCGoalieBrain::update(), and update().

int RCBrain::dribbleToGoal ( ) [inline, protected]
 

Operation.

Definition at line 449 of file RCBrain.java.

Referenced by update().

double RCBrain::gauss ( double x,
double m,
double sigma ) [inline, protected]
 

the gauss function.

Parameters:
value  
median  
deviation  

Definition at line 173 of file RCBrain.java.

Referenced by getPassPartner().

double RCBrain::getAngleToPoint ( double x,
double y ) [inline]
 

calculates the angle between the players direction and a given point.

Returns:
the angle between the players direction and a given point

Definition at line 253 of file RCBrain.java.

Referenced by dribbleToGoal(), getPassPartner(), shoot(), RCGoalieBrain::update(), and update().

RCPartner RCBrain::getPassPartner ( ) [inline, protected]
 

determines a pass partner for the player.

Returns:
a pass partner

Definition at line 294 of file RCBrain.java.

Referenced by shoot().

boolean RCBrain::inField ( double x,
double y ) [inline]
 

determines if the given point is in the players field.

Definition at line 498 of file RCBrain.java.

Referenced by RCGoalieBrain::update(), and update().

boolean RCBrain::isBetween ( double value,
double bound1,
double bound2 ) [inline, protected]
 

determines if value is between bound1 and bound2.

Returns:
true if value is between bound1 and bound2 (else: false)

Definition at line 237 of file RCBrain.java.

Referenced by inField(), and update().

double RCBrain::kickPower ( double distance ) [inline, protected]
 

calculates the kick power in terms of the shoot distance.

Parameters:
distance  

Definition at line 202 of file RCBrain.java.

Referenced by shoot().

boolean RCBrain::searchBall ( ) [inline]
 

Operation.

Definition at line 485 of file RCBrain.java.

Referenced by RCGoalieBrain::update(), and update().

boolean RCBrain::shoot ( ) [inline, protected]
 

Operation.

Definition at line 403 of file RCBrain.java.

Referenced by update().

int RCBrain::update ( ) [inline]
 

every cycle called by the main loop.

Reimplemented in RCGoalieBrain.

Definition at line 511 of file RCBrain.java.

Referenced by RCWorld::receiveEvent().


Member Data Documentation

final double RCBrain::BARRIER_ANGLE = 2.5 [protected]
 

Definition at line 147 of file RCBrain.java.

final double RCBrain::BEST_PASS_DIST = 15. [protected]
 

Definition at line 146 of file RCBrain.java.

RCCommunicator RCBrain::Communicator [protected]
 

Definition at line 137 of file RCBrain.java.

final double RCBrain::DASH_POWER_DRIBBLE = 55. [protected]
 

Definition at line 161 of file RCBrain.java.

final double RCBrain::GOAL_X = 52.5 [protected]
 

Definition at line 158 of file RCBrain.java.

final double RCBrain::GOAL_Y = 0. [protected]
 

Definition at line 159 of file RCBrain.java.

final double RCBrain::HALF_OF_GOALWIDTH = 7. [protected]
 

Definition at line 154 of file RCBrain.java.

final double RCBrain::KICK_POWER_DIRBBLE = 20. [protected]
 

Definition at line 160 of file RCBrain.java.

final double RCBrain::MAX_ANGLE = 7. [protected]
 

Reimplemented in RCGoalieBrain.

Definition at line 155 of file RCBrain.java.

final double RCBrain::MAX_KICK_DIST = .7 [protected]
 

Definition at line 141 of file RCBrain.java.

final double RCBrain::MAX_PASS_DIST = 70. [protected]
 

Definition at line 144 of file RCBrain.java.

final double RCBrain::MAX_POWER_KICK = 100. [protected]
 

Definition at line 162 of file RCBrain.java.

final int RCBrain::MAX_TIME = 10 [protected]
 

Reimplemented in RCGoalieBrain.

Definition at line 163 of file RCBrain.java.

final double RCBrain::MIN_LIKELIHOOD_GOAL = 0.2 [protected]
 

Definition at line 149 of file RCBrain.java.

final double RCBrain::MIN_LIKELIHOOD_PASS = 0.25 [protected]
 

Definition at line 148 of file RCBrain.java.

final double RCBrain::MIN_PASS_DIST = 4. [protected]
 

Definition at line 145 of file RCBrain.java.

final double RCBrain::MIN_POWER_DASH = 80 [protected]
 

Reimplemented in RCGoalieBrain.

Definition at line 151 of file RCBrain.java.

final double RCBrain::MIN_RUN_DIST = 1.5 [protected]
 

Definition at line 153 of file RCBrain.java.

final double RCBrain::NEAR_BALL = 4.5 [protected]
 

Reimplemented in RCGoalieBrain.

Definition at line 140 of file RCBrain.java.

final double RCBrain::NEAR_BORDER = 2. [protected]
 

Definition at line 142 of file RCBrain.java.

final double RCBrain::NEAR_GOAL = 53. [protected]
 

Definition at line 143 of file RCBrain.java.

final double RCBrain::POWER_COEFF_DASH = 30. [protected]
 

Reimplemented in RCGoalieBrain.

Definition at line 150 of file RCBrain.java.

final double RCBrain::POWER_COEFF_KICK = 120. [protected]
 

Definition at line 152 of file RCBrain.java.

final double RCBrain::PRECISION = 0.001 [protected]
 

Definition at line 157 of file RCBrain.java.

final double RCBrain::SEARCH_ANGLE = 40. [protected]
 

Definition at line 156 of file RCBrain.java.

RCWorld RCBrain::World [protected]
 

Associations.

Definition at line 136 of file RCBrain.java.

double RCBrain::myX [protected]
 

Definition at line 138 of file RCBrain.java.

double RCBrain::myY [protected]
 

Definition at line 138 of file RCBrain.java.


The documentation for this class was generated from the following file:
(c) Copyright by Gruppe 1 :