• [rcssserver] 議論中 (akiyama) 21:23:16

全方位移動ダッシュモデル 第二弾

// the compatibility with this year's binaries should be kept at least
// until RoboCup2009.
// after that, this value should be changed and we will have to
// reconsider the catch range or the goal width.
server::min_dash_power = -100

// new parameters
server::side_dash_rate = 0.25
server::back_dash_rate = 0.5

// the value of dir_rate is same as Sebastian's proposal, but the
// effectiveness is parameterized.
double dir_rate = ( fabs( dir ) > 90.0
  ? back_dash_rate - ( back_dash_rate - side_dash_rate )
                     * ( 1.0 - ( fabs( dir ) - 90.0 ) / 90.0 )
  : side_dash_rate + ( 1.0 - side_dash_rate )
                     * ( 1.0 - fabs( dir ) / 90.0 ) )



The complete algorithm is as follows:

Player::dash( double power, double dir )

  power = NormalizeDashPower( power ); // [server::min_dash_power, server::max_dash_power]
  dir = NormalizeDashAngle( dir ); // [server::min_dash_angle, server::max_dash_angle]

  bool back_dash = power < 0;
  double dir_rate = ( fabs( dir ) > 90.0
                      ? back_dash_rate - ( back_dash_rate - side_dash_rate )
                                         * ( 1.0 - ( fabs( dir ) - 90.0 ) / 90.0 )
                      : side_dash_rate - ( 1.0 - side_dash_rate )
                                         * ( 1.0 - fabs( dir ) / 90.0 ) )
  double power_need = back_dash
                    ? power * -2.0
                    : power );
  power_need = min( M_stamina + M_player_type->extraStamina(), power_need );

  M_stamina = max( 0.0, M_stamina - power_need );
  power = back_dash
        ? power_need / -2.0
        : power_need;

  double effective_dash_power = fabs( M_effort
                                      * power
                                      * dir_rate
                                      * M_player_type->dashPowerRate() );
  M_accel += fromPolar( effective_dash_power,
                        body + ( back_dash ? dir + 180 : dir ) );

foulコマンドが提案されてきたけど,ファウルをコマンドにするのはちょっとなぁ….タックルでファウルを取ることにしてはどうかと返しておいた.


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-03-14 (月) 14:51:38 (1219d)
SourceForge.JP
Creative Commons License
RoboCup tools by Hidehisa Akiyama is licensed under a Creative Commons 表示-非営利 2.1 日本 License.