クラス rcsc::Formation

abstarct formation class [詳細]

#include <formation.h>

rcsc::Formationに対する継承グラフ

rcsc::FormationBPN rcsc::FormationDT rcsc::FormationKNN rcsc::FormationNGNet rcsc::FormationRBF rcsc::FormationSBSP rcsc::FormationStatic rcsc::FormationUvA すべてのメンバ一覧

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 [詳細]

説明

abstarct formation class


列挙型

enum rcsc::Formation::SideType

列挙型の値:
SIDE  original type, consider all region
SYNMETRY  synmetry type, this type refers SIDE
CENTER  original type, consider half region


関数

virtual Snapshot rcsc::Formation::createDefaultParam (  )  [pure virtual]

create default formation. assign role and initial positions.

戻り値:
snapshot variable for the initial state(ball pos=(0,0)).

rcsc::FormationBPNrcsc::FormationDTrcsc::FormationKNNrcsc::FormationNGNetrcsc::FormationRBFrcsc::FormationSBSPrcsc::FormationStaticrcsc::FormationUvAで実装されています。

virtual std::string rcsc::Formation::methodName (  )  const [pure virtual]

get the name of this formation

戻り値:
name string

rcsc::FormationBPNrcsc::FormationDTrcsc::FormationKNNrcsc::FormationNGNetrcsc::FormationRBFrcsc::FormationSBSPrcsc::FormationStaticrcsc::FormationUvAで実装されています。

bool rcsc::Formation::isSideType ( const int  unum  )  const [inline]

check if player is SIDE type or not

引数:
unum player's number
戻り値:
true or false

bool rcsc::Formation::isCenterType ( const int  unum  )  const [inline]

check if player is center type or not

引数:
unum player's number
戻り値:
true or false

bool rcsc::Formation::isSynmetryType ( const int  unum  )  const [inline]

check if player is right side type or not

引数:
unum player's number
戻り値:
true or false

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
戻り値:
result of the registration

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::FormationBPNrcsc::FormationDTrcsc::FormationKNNrcsc::FormationNGNetrcsc::FormationRBFrcsc::FormationSBSPrcsc::FormationStaticrcsc::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::FormationBPNrcsc::FormationDTrcsc::FormationKNNrcsc::FormationNGNetrcsc::FormationRBFrcsc::FormationSBSPrcsc::FormationStaticrcsc::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
戻り値:
role name string. if empty string is returned, that means no role parameter is assigned for unum.

rcsc::FormationBPNrcsc::FormationDTrcsc::FormationKNNrcsc::FormationNGNetrcsc::FormationRBFrcsc::FormationSBSPrcsc::FormationStaticrcsc::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::FormationBPNrcsc::FormationDTrcsc::FormationKNNrcsc::FormationNGNetrcsc::FormationRBFrcsc::FormationSBSPrcsc::FormationStaticrcsc::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.
戻り値:
parsing result

rcsc::FormationBPNrcsc::FormationDTrcsc::FormationKNNrcsc::FormationNGNetrcsc::FormationRBFrcsc::FormationSBSPrcsc::FormationStaticrcsc::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
戻り値:
reference to the output stream

rcsc::FormationBPNrcsc::FormationDTrcsc::FormationKNNrcsc::FormationNGNetrcsc::FormationRBFrcsc::FormationSBSPrcsc::FormationStaticrcsc::FormationUvAで実装されています。

int rcsc::Formation::readName ( std::istream &  is  )  [protected]

check formation type name from the current stream pos.

引数:
is reference to the input stream
戻り値:
if success, the number of read lines will be returned. if failed, returned -1.

std::ostream & rcsc::Formation::printName ( std::ostream &  os  )  const [protected]

put formation type name to the output stream

引数:
os reference to the output stream
戻り値:
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.


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:25 2008に生成されました。  doxygen 1.5.0