#include <formation.h>
rcsc::Formationに対する継承グラフ
Public 型 | |
enum | SideType { SIDE = -1, SYNMETRY = 1, CENTER = 0, OUR, OPP, NONE, OUR, OPP } |
Public メソッド | |
Formation () | |
initialize synmetry number matrix by -1 | |
virtual Snapshot | createDefaultParam ()=0 |
create default formation. assign role and initial positions. | |
virtual std::string | methodName () const=0 |
get the name of this formation | |
bool | isSideType (const int unum) const |
check if player is SIDE type or not | |
bool | isCenterType (const int unum) const |
check if player is center type or not | |
bool | isSynmetryType (const int unum) const |
check if player is right side type or not | |
int | getSynmetryNumber (const int unum) const |
get symmetry reference number of the specified player. | |
bool | updateRole (const int unum, const int synmetry_unum, const std::string &role_name) |
set player's role data. if necessary, new parameter is created. | |
virtual std::string | getRoleName (const int unum) const=0 |
get the role name of the specified player | |
virtual Vector2D | getPosition (const int unum, const Vector2D &focus_point) const =0 |
get position for the current focus point | |
virtual void | getPositions (const Vector2D &focus_point, std::vector< Vector2D > &positions) const=0 |
virtual void | train (const std::list< Snapshot > &train_data)=0 |
update formation paramter using training data set | |
virtual bool | read (std::istream &is)=0 |
restore data from the input stream. | |
virtual std::ostream & | print (std::ostream &os) const=0 |
put data to the output stream. | |
Protected メソッド | |
virtual void | createNewRole (const int unum, const std::string &role_name, const SideType type)=0 |
create new role parameter. | |
virtual void | setRoleName (const int unum, const std::string &name)=0 |
set the role name of the specified player | |
void | setCenterType (const int unum) |
set the specified player to the CENTER type | |
void | setSideType (const int unum) |
set the specified player to the SIDE type | |
bool | setSynmetryType (const int unum, const int synmetry_unum) |
set symmetry player info | |
int | readName (std::istream &is) |
check formation type name from the current stream pos. | |
std::ostream & | printName (std::ostream &os) const |
put formation type name to the output stream | |
Protected 変数 | |
int | M_synmetry_number [11] |
構成 | |
struct | Snapshot |
this struct is used to record the field status as a training data [詳細] |
virtual Snapshot rcsc::Formation::createDefaultParam | ( | ) | [pure virtual] |
create default formation. assign role and initial positions.
rcsc::FormationBPN・rcsc::FormationDT・rcsc::FormationKNN・rcsc::FormationNGNet・rcsc::FormationRBF・rcsc::FormationSBSP・rcsc::FormationStatic・rcsc::FormationUvAで実装されています。
virtual std::string rcsc::Formation::methodName | ( | ) | const [pure virtual] |
get the name of this formation
rcsc::FormationBPN・rcsc::FormationDT・rcsc::FormationKNN・rcsc::FormationNGNet・rcsc::FormationRBF・rcsc::FormationSBSP・rcsc::FormationStatic・rcsc::FormationUvAで実装されています。
bool rcsc::Formation::isSideType | ( | const int | unum | ) | const [inline] |
check if player is SIDE type or not
unum | player's number |
bool rcsc::Formation::isCenterType | ( | const int | unum | ) | const [inline] |
check if player is center type or not
unum | player's number |
bool rcsc::Formation::isSynmetryType | ( | const int | unum | ) | const [inline] |
check if player is right side type or not
unum | player's number |
int rcsc::Formation::getSynmetryNumber | ( | const int | unum | ) | const [inline] |
get symmetry reference number of the specified player.
unum | target player's number number that player refers, if player is SYNMETRY type. otherwise 0 or -1. |
bool rcsc::Formation::updateRole | ( | const int | unum, | |
const int | synmetry_unum, | |||
const std::string & | role_name | |||
) |
set player's role data. if necessary, new parameter is created.
unum | status changed player's uniform number | |
synmetry_unum | 0 means type is CENTER, <0 means type is SIDE, >0 means type is SYNMETRY | |
role_name | new role name string |
virtual void rcsc::Formation::createNewRole | ( | const int | unum, | |
const std::string & | role_name, | |||
const SideType | type | |||
) | [protected, pure virtual] |
create new role parameter.
unum | target player's number | |
role_name | new role name | |
type | side type of this parameter |
rcsc::FormationBPN・rcsc::FormationDT・rcsc::FormationKNN・rcsc::FormationNGNet・rcsc::FormationRBF・rcsc::FormationSBSP・rcsc::FormationStatic・rcsc::FormationUvAで実装されています。
virtual void rcsc::Formation::setRoleName | ( | const int | unum, | |
const std::string & | name | |||
) | [protected, pure virtual] |
set the role name of the specified player
unum | target player's number | |
name | role name string. |
rcsc::FormationBPN・rcsc::FormationDT・rcsc::FormationKNN・rcsc::FormationNGNet・rcsc::FormationRBF・rcsc::FormationSBSP・rcsc::FormationStatic・rcsc::FormationUvAで実装されています。
void rcsc::Formation::setCenterType | ( | const int | unum | ) | [protected] |
set the specified player to the CENTER type
unum | player's number |
void rcsc::Formation::setSideType | ( | const int | unum | ) | [protected] |
set the specified player to the SIDE type
unum | player's number |
bool rcsc::Formation::setSynmetryType | ( | const int | unum, | |
const int | synmetry_unum | |||
) | [protected] |
set symmetry player info
unum | changed player's number | |
synmetry_unum | refered player number |
virtual std::string rcsc::Formation::getRoleName | ( | const int | unum | ) | const [pure virtual] |
get the role name of the specified player
unum | target player's number |
rcsc::FormationBPN・rcsc::FormationDT・rcsc::FormationKNN・rcsc::FormationNGNet・rcsc::FormationRBF・rcsc::FormationSBSP・rcsc::FormationStatic・rcsc::FormationUvAで実装されています。
virtual Vector2D rcsc::Formation::getPosition | ( | const int | unum, | |
const Vector2D & | focus_point | |||
) | const [pure virtual] |
get position for the current focus point
unum | player number | |
focus_point | current focus point, usually ball position. |
rcsc::FormationBPN・rcsc::FormationDT・rcsc::FormationKNN・rcsc::FormationNGNet・rcsc::FormationRBF・rcsc::FormationSBSP・rcsc::FormationStatic・rcsc::FormationUvAで実装されています。
virtual void rcsc::Formation::train | ( | const std::list< Snapshot > & | train_data | ) | [pure virtual] |
update formation paramter using training data set
train_data | training data container |
virtual bool rcsc::Formation::read | ( | std::istream & | is | ) | [pure virtual] |
restore data from the input stream.
is | reference to the input stream. |
rcsc::FormationBPN・rcsc::FormationDT・rcsc::FormationKNN・rcsc::FormationNGNet・rcsc::FormationRBF・rcsc::FormationSBSP・rcsc::FormationStatic・rcsc::FormationUvAで実装されています。
virtual std::ostream& rcsc::Formation::print | ( | std::ostream & | os | ) | const [pure virtual] |
put data to the output stream.
os | reference to the output stream |
rcsc::FormationBPN・rcsc::FormationDT・rcsc::FormationKNN・rcsc::FormationNGNet・rcsc::FormationRBF・rcsc::FormationSBSP・rcsc::FormationStatic・rcsc::FormationUvAで実装されています。
int rcsc::Formation::readName | ( | std::istream & | is | ) | [protected] |
check formation type name from the current stream pos.
is | reference to the input stream |
std::ostream & rcsc::Formation::printName | ( | std::ostream & | os | ) | const [protected] |
put formation type name to the output stream
os | reference to the output stream |
int rcsc::Formation::M_synmetry_number[11] [protected] |
synmetry number.holder <0 negative number means this player is original SIDE type. >0 positive numver means that this player is SYNMETRY type and referes other player. ==0 Zero means that this player is CENTER type.