Phoenix2D-Library  0.10
Classes | Enumerations | Functions | Variables
Phoenix Namespace Reference

Classes

class  Actions
  Actions
The Actions lorem Ipsum More...
 
class  Ball
  Ball
The Ball lorem Ipsum More...
 
class  BeforeKickOff
  BeforeKickOff
The BeforeKickOff behavior lorem Ipsum More...
 
class  Command
  Command
The Command lorem Ipsum More...
 
class  Commands
  Commands
The Commans lorem Ipsum More...
 
class  Config
 
struct  Socket
 
class  Connect
 
class  Controller
  Controller
The Controller is the Main Manager of the Phoenix2D Player. It is composed of references to the Main Objects in the Library. The Controller is in charge of instantiation of the rest of the inner objects using the user's parameters. More...
 
class  CornerKickL
  CornerKickL
The CornerKickL lorem Ipsum More...
 
class  CornerKickR
  CornerKickR
The CornerKickR lorem Ipsum More...
 
struct  _coordinate
  _coordinate
The Coordinate is just a holder for coordinates More...
 
class  Flag
  Flag
The Flag lorem Ipsum More...
 
class  FreeKickL
  FreeKickL
The FreeKickL lorem Ipsum More...
 
class  FreeKickR
  FreeKickR
The FreeKickR lorem Ipsum More...
 
class  Game
  Game
The Game lorem Ipsum More...
 
class  GoalKickL
  GoalKickL
The GoalKickL lorem Ipsum More...
 
class  GoalKickR
  GoalKickR
The GoalKickR lorem Ipsum More...
 
class  KickInL
  KickInL
The KickInL lorem Ipsum More...
 
class  KickInR
  KickInR
The KickInR lorem Ipsum More...
 
class  KickOffL
  KickOffL
The KickOffL lorem Ipsum More...
 
class  KickOffR
  KickOffR
The KickOffR lorem Ipsum More...
 
class  Line
  Line
The Line lorem Ipsum More...
 
class  Logger
  Logger
The Logger lorem Ipsum More...
 
class  Normal
  Normal
The Normal lorem Ipsum More...
 
class  Parser
  Parser
The Parser lorem Ipsum More...
 
class  Player
  Player
The Player lorem Ipsum More...
 
class  PlayMode
  PlayMode
The PlayMode lorem Ipsum More...
 
class  PlayOn
  PlayOn
The PlayOn lorem Ipsum More...
 
class  Position
  Position
The Position lorem Ipsum More...
 
class  Reader
  Reader
The Reader lorem Ipsum More...
 
class  Self
  Self
The Self lorem Ipsum More...
 
class  Server
  Server
The Server lorem Ipsum More...
 
struct  execution_line
 
class  Trainer
  Trainer
The Trainer lorem Ipsum More...
 
class  Vector2D
  Vector2D
The Vector2D lorem Ipsum More...
 
class  World
  World
The World lorem Ipsum More...
 
class  WorldModel
  WorldModel
The WorldModel lorem Ipsum More...
 

Enumerations

enum  COMMAND_STATUS { CREATED, SENT, EXECUTED, ERROR }
  COMMAND_STATUS
The Command type lorem Ipsum More...
 
enum  COMMAND_TYPE {
  EMPTY, MOVE, DASH, TURN,
  SAY, CATCH, KICK, TACKLE,
  TURN_NECK, POINT, CHANGE_VIEW, MOVE_OBJECT,
  CHANGE_MODE, START, RECOVER, CHANGE_PLAYER_TYPE
}
  COMMAND_TYPE
The Command type lorem Ipsum More...
 
enum  POSITION_TYPE {
  EMPTY_P, XLINE, YLINE, POINT_P,
  OBJECT, PLAYER, COMPLETE
}
  POSITION_TYPE
The Position Type lorem Ipsum More...
 
enum  COMMANDS {
  START, DO, CHANGE_TO, RECOVER,
  END_DO, SAY, END
}
 
enum  VECTOR_TYPE { EMPTY_V, V2D }
  VECTOR_TYPE
The Vector Type lorem Ipsum More...
 

Functions

boost::regex config_regex ("\\(config\\s(\\w+)\\s(\\w+)\\)")
 
boost::regex position_regex ("\\(position\\s(\\d+)\\s([\\d\\.\\-]+)\\s([\\d\\.\\-]+)\\)")
 
boost::regex logging_regex ("\\(logging\\s(\\d+)\\)")
 
boost::regex verbose_regex ("\\(verbose\\s(\\d+)\\)")
 
boost::regex player_history_regex ("\\(player_history\\s(\\d+)\\)")
 
void connectToServer (const char *host, int port)
 
_coordinate makeCoordinate (double x, double y)
 
boost::regex goal_regex ("goal_(l|r)_(\\d+)")
 
static boost::regex see_regex ("\\(([^()]+)\\)\\s*([\\d\\.\\-etk\\s]*)")
 
boost::regex hear_referee_regex ("\\(hear\\s+(\\d+)\\s+referee\\s+([\\\"\\w\\s]*)\\)")
 
boost::regex hear_coach_regex ("\\(hear\\s+(\\d+)\\s+(online_coach_left|online_coach_right)\\s+([\\\"\\w\\s]*)\\)")
 
boost::regex hear_trainer_regex ("\\(hear\\s+(\\d+)\\s+coach\\s+([\\\"\\w\\s]*)\\)")
 
boost::regex hear_player_regex ("\\(hear\\s+(\\d+)\\s+([\\d\\.\\-e]+)\\s+our\\s+(\\d+)\\s+([\\\"\\w\\s]+)\\)")
 
bool compareFlags (Flag f0, Flag f1)
 
void * process_sense_body (void *arg)
 
void * process_see (void *arg)
 
boost::circular_buffer< Positionpositions (4)
 
void * run (void *arg)
 
boost::regex sense_body_regex ("^\\(sense_body\\s+\\d+\\s+""\\(view_mode\\s+(\\w+)\\s+(\\w+)\\)\\s*""\\(stamina\\s+([\\d\\.\\-e]+)\\s+([\\d\\.\\-e]+)\\s+([\\d\\.\\-e]+)\\)\\s*""\\(speed\\s+([\\d\\.\\-e]+)\\s+([\\d\\.\\-e]+)\\)\\s*""\\(head_angle\\s+([\\d\\.\\-e]+)\\)\\s*""\\(kick\\s+(\\d+)\\)\\s*""\\(dash\\s+(\\d+)\\)\\s*""\\(turn\\s+(\\d+)\\)\\s*""\\(say\\s+(\\d+)\\)\\s*""\\(turn_neck\\s+(\\d+)\\)\\s*""\\(catch\\s+(\\d+)\\)\\s*""\\(move\\s+(\\d+)\\)\\s*""\\(change_view\\s+(\\d+)\\)\\s*""\\(arm\\s+""\\(movable\\s+(\\d+)\\)\\s*""\\(expires\\s+(\\d+)\\)\\s*""\\(target\\s+([\\d\\.\\-e]+)\\s+([\\d\\.\\-e]+)\\)\\s*""\\(count\\s+(\\d+)\\)\\s*""\\)\\s*""\\(focus\\s+""\\(target\\s+(none|[lr]\\s+\\d+)\\)\\s*""\\(count\\s+(\\d+)\\)\\s*""\\)\\s*""\\(tackle\\s+""\\(expires\\s+(\\d+)\\)\\s*""\\(count\\s+(\\d+)\\)\\s*""\\)\\s*""\\(collision\\s+(none|\\(ball\\)|\\(player\\)|\\(post\\)|\\s)+\\)\\s*""\\(foul\\s+""\\(charged\\s+(\\d+)\\)\\s*""\\(card\\s+(none|yellow|red)\\)\\s*""\\)\\s*""\\)$")
 
static boost::circular_buffer
< std::string > 
view_mode_width_buffer (Config::BUFFER_MAX_HISTORY,"normal")
 
static boost::circular_buffer
< std::string > 
view_mode_quality_buffer (Config::BUFFER_MAX_HISTORY,"high")
 
static boost::circular_buffer
< double > 
stamina_buffer (Config::BUFFER_MAX_HISTORY, 0.0)
 
static boost::circular_buffer
< double > 
effort_buffer (Config::BUFFER_MAX_HISTORY, 0.0)
 
static boost::circular_buffer
< double > 
stamina_capacity_buffer (Config::BUFFER_MAX_HISTORY, 0.0)
 
static boost::circular_buffer
< double > 
amount_of_speed_buffer (Config::BUFFER_MAX_HISTORY, 0.0)
 
static boost::circular_buffer
< double > 
direction_of_speed_buffer (Config::BUFFER_MAX_HISTORY, 0.0)
 
static boost::circular_buffer
< double > 
head_angle_buffer (Config::BUFFER_MAX_HISTORY, 0.0)
 
static boost::circular_buffer
< int > 
kick_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
dash_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
turn_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
say_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
turn_neck_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
catch_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
move_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
change_view_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
arm_movable_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
arm_expires_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< double > 
arm_dist_buffer (Config::BUFFER_MAX_HISTORY, 0.0)
 
static boost::circular_buffer
< double > 
arm_dir_buffer (Config::BUFFER_MAX_HISTORY, 0.0)
 
static boost::circular_buffer
< int > 
arm_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< std::string > 
focus_target_buffer (Config::BUFFER_MAX_HISTORY,"none")
 
static boost::circular_buffer
< int > 
focus_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
tackle_expires_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< int > 
tackle_count_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< std::list< std::string > > 
collisions_buffer (Config::BUFFER_MAX_HISTORY, empty_vector)
 
static boost::circular_buffer
< int > 
foul_charged_buffer (Config::BUFFER_MAX_HISTORY, 0)
 
static boost::circular_buffer
< std::string > 
foul_card_buffer (Config::BUFFER_MAX_HISTORY,"none")
 
std::string getPlayerTypeParameter (const std::string &player_type, std::string parameter)
 
std::string getPlayerParameter (const std::string &player_params, std::string parameter)
 
double angleMean (std::list< double > arcs)
 
bool triangular (Flag *flag0, Flag *flag1, double &x_t, double &y_t, double &theta_t, double &error_d)
 
bool areaCheck (double x_min, double x_max, double rmax, double x_c, double y_c, double error)
 
bool loadCode ()
 
bool generateCode ()
 
bool compareDistances (Player *player0, Player *player1)
 

Variables

Connectcommands_connect_ptr = 0
 
std::list< Commandcommands_history
 
std::list< Command * > commands_to_send
 
Socket sock
 
std::string play_modes = "before_kick_off corner_kick_l corner_kick_r free_kick_l free_kick_r goal_kick_l goal_kick_r kick_in_l kick_in_r kick_off_l kick_off_r play_on"
 
std::string events = "drop_ball goal_l goal_r offside_l offside_r"
 
static bool cycle_flag = false
 
static bool on_game = true
 
static pthread_cond_t cycle_cond = PTHREAD_COND_INITIALIZER
 
static pthread_mutex_t cycle_mutex = PTHREAD_MUTEX_INITIALIZER
 
std::filebuf buf
 
std::streambuf * oldbuf
 
static std::string sense_body_message = ""
 
static std::string see_message = ""
 
static bool see_received = false
 
static bool processing_body = false
 
static bool processing_see = false
 
static Selfself_ptr = 0
 
static Gamegame_ptr = 0
 
static Worldworld_ptr = 0
 
static PlayModeplay_mode_ptr = 0
 
static Trainertrainer_ptr = 0
 
static pthread_cond_t see_cond = PTHREAD_COND_INITIALIZER
 
static pthread_mutex_t see_mutex = PTHREAD_MUTEX_INITIALIZER
 
static pthread_cond_t sense_body_cond = PTHREAD_COND_INITIALIZER
 
static pthread_mutex_t sense_body_mutex = PTHREAD_MUTEX_INITIALIZER
 
pthread_t thread_sense_body = 0
 
pthread_t thread_see = 0
 
pthread_attr_t attr
 
bool move = false
 
Connectconnect_ptr = 0
 
Parserparser_ptr = 0
 
bool running = false
 
pthread_t thread = 0
 
int * types_id
 
double * player_speed_max
 
double * stamina_inc_max
 
double * player_decay
 
double * inertia_moment
 
double * dash_power_rate
 
double * player_size
 
double * kickable_margin
 
double * kick_rand
 
double * extra_stamina
 
double * effort_max
 
double * effort_min
 
double * kick_power_rate
 
double * foul_detect_probability
 
double * catchable_area_l_stretch
 
double u [3] = {0.0, 0.0, 0.0}
 
bool positioned = false
 
static double x = 0.0
 
static double y = 0.0
 
static double theta = 0.0
 
static std::list< Command * > last_commands_sent
 
std::list< std::string > empty_vector
 
std::vector< std::string > code
 
std::vector< execution_lineprogram
 
int current_line = 0
 
std::stack< int > accums
 
std::list< Playerplayers
 
Ball ball
 
Position positionToCompare
 

Enumeration Type Documentation

COMMAND_STATUS
The Command type lorem Ipsum

Enumerator
CREATED 
SENT 
EXECUTED 
ERROR 

Definition at line 36 of file Command.h.

COMMAND_TYPE
The Command type lorem Ipsum

Enumerator
EMPTY 

Used by Player and Goalie.

MOVE 

Used by Player and Goalie.

DASH 

Used by Player and Goalie.

TURN 

Used by Player and Goalie.

SAY 

Used by Player and Goalie.

CATCH 

Used by Player and Goalie.

KICK 

Used by Player and Goalie.

TACKLE 

Used by Player and Goalie.

TURN_NECK 

Used by Player and Goalie.

POINT 

Used by Player and Goalie.

CHANGE_VIEW 

Used by Player and Goalie.

MOVE_OBJECT 

Used by Trainer.

CHANGE_MODE 

Used by Trainer.

START 

Used by Trainer.

RECOVER 

Used by Trainer.

CHANGE_PLAYER_TYPE 

Used by trainer and/or coach.

Definition at line 47 of file Command.h.

Enumerator
START 

Used by Trainer.

DO 
CHANGE_TO 
RECOVER 

Used by Trainer.

END_DO 
SAY 

Used by Player and Goalie.

END 

Definition at line 35 of file Trainer.cpp.

POSITION_TYPE
The Position Type lorem Ipsum

Enumerator
EMPTY_P 

Emtpy.

XLINE 

Emtpy.

YLINE 

Emtpy.

POINT_P 

Emtpy.

OBJECT 

Emtpy.

PLAYER 

Emtpy.

COMPLETE 

Emtpy.

Definition at line 36 of file Position.h.

VECTOR_TYPE
The Vector Type lorem Ipsum

Enumerator
EMPTY_V 

Empty Type.

V2D 

Vector 2D.

Definition at line 36 of file Vector2D.h.

Function Documentation

static boost::circular_buffer<double> Phoenix::amount_of_speed_buffer ( Config::BUFFER_MAX_HISTORY  ,
0.  0 
)
static
double Phoenix::angleMean ( std::list< double >  arcs)

Definition at line 524 of file Self.cpp.

References Phoenix::Self::PI.

Referenced by Phoenix::Self::localize().

bool Phoenix::areaCheck ( double  x_min,
double  x_max,
double  rmax,
double  x_c,
double  y_c,
double  error 
)

Definition at line 614 of file Self.cpp.

References theta, x, and y.

static boost::circular_buffer<int> Phoenix::arm_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<double> Phoenix::arm_dir_buffer ( Config::BUFFER_MAX_HISTORY  ,
0.  0 
)
static
static boost::circular_buffer<double> Phoenix::arm_dist_buffer ( Config::BUFFER_MAX_HISTORY  ,
0.  0 
)
static
static boost::circular_buffer<int> Phoenix::arm_expires_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<int> Phoenix::arm_movable_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<int> Phoenix::catch_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<int> Phoenix::change_view_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<std::list<std::string> > Phoenix::collisions_buffer ( Config::BUFFER_MAX_HISTORY  ,
empty_vector   
)
static
bool Phoenix::compareDistances ( Player *  player0,
Player *  player1 
)
bool Phoenix::compareFlags ( Flag  f0,
Flag  f1 
)

Definition at line 66 of file Parser.cpp.

References Phoenix::Flag::getDistance().

Here is the call graph for this function:

boost::regex Phoenix::config_regex ( "\\(config\\s(\\w+)\\s(\\w+)\\)"  )

Referenced by Phoenix::Config::Config().

void Phoenix::connectToServer ( const char *  host,
int  port 
)

Definition at line 38 of file Connect.cpp.

References Phoenix::Socket::server, sock, and Phoenix::Socket::socketfd.

Referenced by Phoenix::Connect::Connect().

static boost::circular_buffer<int> Phoenix::dash_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<double> Phoenix::direction_of_speed_buffer ( Config::BUFFER_MAX_HISTORY  ,
0.  0 
)
static
static boost::circular_buffer<double> Phoenix::effort_buffer ( Config::BUFFER_MAX_HISTORY  ,
0.  0 
)
static
static boost::circular_buffer<int> Phoenix::focus_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<std::string> Phoenix::focus_target_buffer ( Config::BUFFER_MAX_HISTORY  ,
"none"   
)
static
static boost::circular_buffer<std::string> Phoenix::foul_card_buffer ( Config::BUFFER_MAX_HISTORY  ,
"none"   
)
static
static boost::circular_buffer<int> Phoenix::foul_charged_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
bool Phoenix::generateCode ( )

Definition at line 71 of file Trainer.cpp.

References CHANGE_TO, code, DO, END, END_DO, program, RECOVER, and SAY.

Referenced by Phoenix::Trainer::Trainer().

std::string Phoenix::getPlayerParameter ( const std::string &  player_params,
std::string  parameter 
)

Definition at line 213 of file Self.cpp.

Referenced by Phoenix::Self::Self().

std::string Phoenix::getPlayerTypeParameter ( const std::string &  player_type,
std::string  parameter 
)

Definition at line 201 of file Self.cpp.

Referenced by Phoenix::Self::addPlayerType().

boost::regex Phoenix::goal_regex ( "goal_(l|r)_(\\d+)"  )
static boost::circular_buffer<double> Phoenix::head_angle_buffer ( Config::BUFFER_MAX_HISTORY  ,
0.  0 
)
static
boost::regex Phoenix::hear_coach_regex ( "\\(hear\\s+(\\d+)\\s+(online_coach_left|online_coach_right)\\s+([\\\"\\w\\s]*)\\)"  )
boost::regex Phoenix::hear_player_regex ( "\\(hear\\s+(\\d+)\\s+([\\d\\.\\-e]+)\\s+our\\s+(\\d+)\\s+([\\\"\\w\\s]+)\\)"  )
boost::regex Phoenix::hear_referee_regex ( "\\(hear\\s+(\\d+)\\s+referee\\s+([\\\"\\w\\s]*)\\)"  )
boost::regex Phoenix::hear_trainer_regex ( "\\(hear\\s+(\\d+)\\s+coach\\s+([\\\"\\w\\s]*)\\)"  )
static boost::circular_buffer<int> Phoenix::kick_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
bool Phoenix::loadCode ( )

Definition at line 55 of file Trainer.cpp.

References code.

Referenced by Phoenix::Trainer::Trainer().

boost::regex Phoenix::logging_regex ( "\\(logging\\s(\\d+)\\)"  )
_coordinate Phoenix::makeCoordinate ( double  x,
double  y 
)

Definition at line 29 of file Flag.cpp.

References Phoenix::Self::SIDE, and x.

Referenced by Phoenix::Flag::initializeField().

static boost::circular_buffer<int> Phoenix::move_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
boost::regex Phoenix::player_history_regex ( "\\(player_history\\s(\\d+)\\)"  )

Referenced by Phoenix::Config::load().

boost::regex Phoenix::position_regex ( "\\(position\\s(\\d+)\\s([\\d\\.\\-]+)\\s([\\d\\.\\-]+)\\)"  )

Referenced by Phoenix::Config::load().

boost::circular_buffer<Position> Phoenix::positions ( )
void* Phoenix::process_see ( void *  arg)
void* Phoenix::process_sense_body ( void *  arg)
void* Phoenix::run ( void *  arg)

Definition at line 35 of file Reader.cpp.

References Phoenix::Reader::execute().

Referenced by Phoenix::Reader::start().

Here is the call graph for this function:

static boost::circular_buffer<int> Phoenix::say_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::regex Phoenix::see_regex ( "\\(([^()]+)\\)\\s*([\\d\\.\\-etk\\s]*)"  )
static
boost::regex Phoenix::sense_body_regex ( "^\\(sense_body\\s+\\d+\\s+""\\(view_mode\\s+(\\w+)\\s+(\\w+)\\)\\s*""\\(stamina\\s+([\\d\\.\\-e]+)\\s+([\\d\\.\\-e]+)\\s+([\\d\\.\\-e]+)\\)\\s*""\\(speed\\s+([\\d\\.\\-e]+)\\s+([\\d\\.\\-e]+)\\)\\s*""\\(head_angle\\s+([\\d\\.\\-e]+)\\)\\s*""\\(kick\\s+(\\d+)\\)\\s*""\\(dash\\s+(\\d+)\\)\\s*""\\(turn\\s+(\\d+)\\)\\s*""\\(say\\s+(\\d+)\\)\\s*""\\(turn_neck\\s+(\\d+)\\)\\s*""\\(catch\\s+(\\d+)\\)\\s*""\\(move\\s+(\\d+)\\)\\s*""\\(change_view\\s+(\\d+)\\)\\s*""\\(arm\\s+""\\(movable\\s+(\\d+)\\)\\s*""\\(expires\\s+(\\d+)\\)\\s*""\\(target\\s+([\\d\\.\\-e]+)\\s+([\\d\\.\\-e]+)\\)\\s*""\\(count\\s+(\\d+)\\)\\s*""\\)\\s*""\\(focus\\s+""\\(target\\s+(none|[lr]\\s+\\d+)\\)\\s*""\\(count\\s+(\\d+)\\)\\s*""\\)\\s*""\\(tackle\\s+""\\(expires\\s+(\\d+)\\)\\s*""\\(count\\s+(\\d+)\\)\\s*""\\)\\s*""\\(collision\\s+(none|\\(ball\\)|\\(player\\)|\\(post\\)|\\s)+\\)\\s*""\\(foul\\s+""\\(charged\\s+(\\d+)\\)\\s*""\\(card\\s+(none|yellow|red)\\)\\s*""\\)\\s*""\\)$"  )
static boost::circular_buffer<double> Phoenix::stamina_buffer ( Config::BUFFER_MAX_HISTORY  ,
0.  0 
)
static
static boost::circular_buffer<double> Phoenix::stamina_capacity_buffer ( Config::BUFFER_MAX_HISTORY  ,
0.  0 
)
static
static boost::circular_buffer<int> Phoenix::tackle_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<int> Phoenix::tackle_expires_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
bool Phoenix::triangular ( Flag *  flag0,
Flag *  flag1,
double &  x_t,
double &  y_t,
double &  theta_t,
double &  error_d 
)

(x - x0)^2 + (y - y0)^2 = d0 (x - x1)^2 + (y - y1)^2 = d1 Being: k0 = d0^2 - x0^2 - y1^2 k1 = d1^2 - x1^2 - y1^2

Definition at line 543 of file Self.cpp.

References Phoenix::Flag::getDirection(), Phoenix::Flag::getDistance(), Phoenix::Flag::getError(), Phoenix::Flag::getX(), Phoenix::Flag::getY(), Phoenix::Self::PI, x, and y.

Here is the call graph for this function:

static boost::circular_buffer<int> Phoenix::turn_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
static boost::circular_buffer<int> Phoenix::turn_neck_count_buffer ( Config::BUFFER_MAX_HISTORY  ,
 
)
static
boost::regex Phoenix::verbose_regex ( "\\(verbose\\s(\\d+)\\)"  )

Referenced by Phoenix::Config::load().

static boost::circular_buffer<std::string> Phoenix::view_mode_quality_buffer ( Config::BUFFER_MAX_HISTORY  ,
"high"   
)
static
static boost::circular_buffer<std::string> Phoenix::view_mode_width_buffer ( Config::BUFFER_MAX_HISTORY  ,
"normal"   
)
static

Variable Documentation

std::stack<int> Phoenix::accums

Definition at line 126 of file Trainer.cpp.

pthread_attr_t Phoenix::attr
Ball Phoenix::ball
std::filebuf Phoenix::buf

Definition at line 31 of file Logger.cpp.

Referenced by Phoenix::Logger::log(), and Phoenix::Logger::~Logger().

double* Phoenix::catchable_area_l_stretch
std::vector<std::string> Phoenix::code

Definition at line 33 of file Trainer.cpp.

Referenced by generateCode(), and loadCode().

Connect* Phoenix::commands_connect_ptr = 0

Definition at line 34 of file Commands.cpp.

Referenced by Phoenix::Commands::Commands(), and Phoenix::Commands::sendCommands().

std::list<Command> Phoenix::commands_history
std::list<Command*> Phoenix::commands_to_send
Connect* Phoenix::connect_ptr = 0
int Phoenix::current_line = 0

Definition at line 125 of file Trainer.cpp.

pthread_cond_t Phoenix::cycle_cond = PTHREAD_COND_INITIALIZER
static

Definition at line 34 of file Game.cpp.

Referenced by Phoenix::Game::nextCycle(), and Phoenix::Game::updateTime().

bool Phoenix::cycle_flag = false
static

Definition at line 32 of file Game.cpp.

Referenced by Phoenix::Game::nextCycle(), and Phoenix::Game::updateTime().

pthread_mutex_t Phoenix::cycle_mutex = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 35 of file Game.cpp.

Referenced by Phoenix::Game::nextCycle(), and Phoenix::Game::updateTime().

double* Phoenix::dash_power_rate
double* Phoenix::effort_max
double* Phoenix::effort_min
std::list<std::string> Phoenix::empty_vector

Definition at line 118 of file Self.cpp.

Referenced by Phoenix::Self::getCollisionsAtTime().

std::string Phoenix::events = "drop_ball goal_l goal_r offside_l offside_r"

Definition at line 30 of file Game.cpp.

Referenced by Phoenix::Game::updatePlayMode().

double* Phoenix::extra_stamina
double* Phoenix::foul_detect_probability
Game* Phoenix::game_ptr = 0
static
double* Phoenix::inertia_moment
double* Phoenix::kick_power_rate
double* Phoenix::kick_rand
double* Phoenix::kickable_margin
std::list<Command*> Phoenix::last_commands_sent
static

Definition at line 92 of file Self.cpp.

Referenced by Phoenix::Self::processSenseBody(), and Phoenix::Self::setLastCommandsSet().

bool Phoenix::move = false

Definition at line 34 of file PlayOn.cpp.

Referenced by Phoenix::PlayOn::onPlayerExecute(), and Phoenix::PlayOn::setup().

std::streambuf* Phoenix::oldbuf

Definition at line 32 of file Logger.cpp.

Referenced by Phoenix::Logger::log(), and Phoenix::Logger::~Logger().

bool Phoenix::on_game = true
static

Definition at line 33 of file Game.cpp.

Referenced by Phoenix::Game::nextCycle(), and Phoenix::Game::updatePlayMode().

Parser* Phoenix::parser_ptr = 0

Definition at line 31 of file Reader.cpp.

Referenced by Phoenix::Reader::execute(), and Phoenix::Reader::Reader().

PlayMode* Phoenix::play_mode_ptr = 0
static

Definition at line 51 of file Parser.cpp.

Referenced by Phoenix::Parser::parseMessage(), and Phoenix::Parser::registerPlayMode().

std::string Phoenix::play_modes = "before_kick_off corner_kick_l corner_kick_r free_kick_l free_kick_r goal_kick_l goal_kick_r kick_in_l kick_in_r kick_off_l kick_off_r play_on"

Definition at line 29 of file Game.cpp.

Referenced by Phoenix::Game::updatePlayMode().

double* Phoenix::player_decay
double* Phoenix::player_size
double* Phoenix::player_speed_max
std::list<Player> Phoenix::players
bool Phoenix::positioned = false

Definition at line 88 of file Self.cpp.

Referenced by Phoenix::Self::localize(), and Phoenix::Self::processSenseBody().

Position Phoenix::positionToCompare
bool Phoenix::processing_body = false
static

Definition at line 46 of file Parser.cpp.

Referenced by Phoenix::Parser::parseMessage(), process_see(), and process_sense_body().

bool Phoenix::processing_see = false
static

Definition at line 47 of file Parser.cpp.

Referenced by Phoenix::Parser::parseMessage(), process_see(), and process_sense_body().

std::vector<execution_line> Phoenix::program

Definition at line 53 of file Trainer.cpp.

Referenced by Phoenix::Trainer::execute(), and generateCode().

bool Phoenix::running = false
pthread_cond_t Phoenix::see_cond = PTHREAD_COND_INITIALIZER
static

Definition at line 58 of file Parser.cpp.

Referenced by process_see(), and process_sense_body().

std::string Phoenix::see_message = ""
static

Definition at line 44 of file Parser.cpp.

Referenced by Phoenix::Parser::parseMessage(), and process_see().

pthread_mutex_t Phoenix::see_mutex = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 59 of file Parser.cpp.

Referenced by process_see(), and process_sense_body().

bool Phoenix::see_received = false
static

Definition at line 45 of file Parser.cpp.

Referenced by Phoenix::Parser::parseMessage(), and process_sense_body().

Self* Phoenix::self_ptr = 0
static

Definition at line 48 of file Parser.cpp.

Referenced by Phoenix::Parser::Parser(), process_see(), and process_sense_body().

pthread_cond_t Phoenix::sense_body_cond = PTHREAD_COND_INITIALIZER
static

Definition at line 60 of file Parser.cpp.

Referenced by process_see(), and process_sense_body().

std::string Phoenix::sense_body_message = ""
static

Definition at line 43 of file Parser.cpp.

Referenced by Phoenix::Parser::parseMessage(), and process_sense_body().

pthread_mutex_t Phoenix::sense_body_mutex = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 61 of file Parser.cpp.

Referenced by process_see(), and process_sense_body().

Socket Phoenix::sock
double* Phoenix::stamina_inc_max
double Phoenix::theta = 0.0
static
pthread_t Phoenix::thread = 0

Definition at line 33 of file Reader.cpp.

Referenced by Phoenix::Reader::start(), and Phoenix::Reader::stop().

pthread_t Phoenix::thread_see = 0

Definition at line 63 of file Parser.cpp.

Referenced by Phoenix::Parser::parseMessage().

pthread_t Phoenix::thread_sense_body = 0

Definition at line 62 of file Parser.cpp.

Referenced by Phoenix::Parser::parseMessage().

Trainer* Phoenix::trainer_ptr = 0
static

Definition at line 52 of file Parser.cpp.

Referenced by Phoenix::Parser::registerTrainer().

int* Phoenix::types_id
double Phoenix::u[3] = {0.0, 0.0, 0.0}

Definition at line 52 of file Self.cpp.

Referenced by Phoenix::Self::localize(), and Phoenix::Self::processSenseBody().

World* Phoenix::world_ptr = 0
static
double Phoenix::x = 0.0
static
double Phoenix::y = 0.0
static