00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00049 #include "PlayerSettings.h"
00050
00051
00052
00053
00054
00058 PlayerSettings::PlayerSettings( ) : GenericValues("PlayerSettings", 27)
00059 {
00060 dPlayerConfThr = 0.88;
00061 dPlayerHighConfThr = 0.92;
00062 dBallConfThr = 0.90;
00063 dPlayerDistTolerance = 7.5;
00064 dPlayerWhenToTurnAngle = 7.0;
00065 dPlayerWhenToKick = 0.85;
00066 iPlayerWhenToIntercept = 30;
00067 dClearBallDist = 5.0;
00068 dClearBallOppMaxDist = 30.0;
00069 dClearBallToSideAngle = 17.0;
00070 dConeWidth = 0.5;
00071 dPassEndSpeed = 1.2;
00072 dFastPassEndSpeed = 1.8;
00073 dPassExtraX = 0.0;
00074 dFractionWaitNoSee = 0.61;
00075 dFractionWaitSeeBegin = 0.70;
00076 dFractionWaitSeeEnd = 0.85;
00077 dMarkDistance = 5.0;
00078 dStratAreaRadius = 5.0;
00079 dShootRiskProbability = 0.88;
00080 iCyclesCatchWait = 20;
00081 iServerTimeOut = 9;
00082 dDribbleAngThr = 20.0;
00083 dTurnWithBallAngThr = 45.0;
00084 dTurnWithBallFreezeThr = 0.2;
00085 iInitialFormation = 2;
00086 dMaxYPercentage = 0.8;
00087
00088
00089 addSetting( "player_conf_thr" , &dPlayerConfThr, GENERIC_VALUE_DOUBLE );
00090 addSetting( "player_high_conf_thr", &dPlayerHighConfThr,
00091 GENERIC_VALUE_DOUBLE );
00092 addSetting( "ball_conf_thr" , &dBallConfThr, GENERIC_VALUE_DOUBLE );
00093 addSetting( "player_dist_tolerance",&dPlayerDistTolerance,
00094 GENERIC_VALUE_DOUBLE );
00095 addSetting( "player_when_to_turn", &dPlayerWhenToTurnAngle,
00096 GENERIC_VALUE_DOUBLE );
00097 addSetting( "player_when_to_kick", &dPlayerWhenToKick,GENERIC_VALUE_DOUBLE );
00098 addSetting( "player_when_to_intercept",&iPlayerWhenToIntercept,
00099 GENERIC_VALUE_INTEGER);
00100 addSetting( "clear_ball_dist" , &dClearBallDist, GENERIC_VALUE_DOUBLE );
00101 addSetting( "clear_ball_opp_max_dist", &dClearBallOppMaxDist,
00102 GENERIC_VALUE_DOUBLE );
00103 addSetting( "clear_ball_side_angle", &dClearBallToSideAngle,
00104 GENERIC_VALUE_DOUBLE );
00105 addSetting( "cone_width" , &dConeWidth, GENERIC_VALUE_DOUBLE );
00106 addSetting( "pass_end_speed" , &dPassEndSpeed, GENERIC_VALUE_DOUBLE );
00107 addSetting( "fast_pass_end_speed", &dFastPassEndSpeed,GENERIC_VALUE_DOUBLE );
00108 addSetting( "pass_extra_x" , &dPassExtraX, GENERIC_VALUE_DOUBLE );
00109 addSetting( "wait_no_see" ,&dFractionWaitNoSee,GENERIC_VALUE_DOUBLE );
00110 addSetting( "wait_see_begin" , &dFractionWaitSeeBegin,GENERIC_VALUE_DOUBLE );
00111 addSetting( "wait_see_end" , &dFractionWaitSeeEnd, GENERIC_VALUE_DOUBLE );
00112 addSetting( "mark_distance" , &dMarkDistance, GENERIC_VALUE_DOUBLE );
00113 addSetting( "strat_area_radius" , &dStratAreaRadius,GENERIC_VALUE_DOUBLE );
00114 addSetting( "shoot_risk_prob", &dShootRiskProbability,GENERIC_VALUE_DOUBLE );
00115 addSetting( "cycles_catch_wait" , &iCyclesCatchWait,GENERIC_VALUE_INTEGER);
00116 addSetting( "server_time_out" , &iServerTimeOut, GENERIC_VALUE_INTEGER);
00117 addSetting( "dribble_ang_thr" , &dDribbleAngThr, GENERIC_VALUE_DOUBLE );
00118 addSetting( "turn_with_ball_ang_thr" , &dTurnWithBallAngThr,
00119 GENERIC_VALUE_DOUBLE );
00120 addSetting( "turn_with_ball_freeze_thr" , &dTurnWithBallFreezeThr,
00121 GENERIC_VALUE_DOUBLE );
00122 addSetting( "initial_formation" , &iInitialFormation,GENERIC_VALUE_INTEGER);
00123 addSetting( "max_y_percentage" , &dMaxYPercentage, GENERIC_VALUE_DOUBLE );
00124
00125 }
00126
00130 double PlayerSettings::getPlayerConfThr( ) const
00131 {
00132 return dPlayerConfThr;
00133 }
00134
00139 bool PlayerSettings::setPlayerConfThr( double d )
00140 {
00141 dPlayerConfThr = d;
00142 return true;
00143 }
00144
00148 double PlayerSettings::getPlayerHighConfThr( ) const
00149 {
00150 return dPlayerHighConfThr;
00151 }
00152
00157 bool PlayerSettings::setPlayerHighConfThr( double d )
00158 {
00159 dPlayerHighConfThr = d;
00160 return true;
00161 }
00162
00166 double PlayerSettings::getBallConfThr( ) const
00167 {
00168 return dBallConfThr;
00169 }
00170
00175 bool PlayerSettings::setBallConfThr( double d )
00176 {
00177 dBallConfThr = d;
00178 return true;
00179 }
00180
00184 double PlayerSettings::getPlayerDistTolerance( ) const
00185 {
00186 return dPlayerDistTolerance;
00187 }
00188
00193 bool PlayerSettings::setPlayerDistTolerance( double d )
00194 {
00195 dPlayerDistTolerance = d;
00196 return true;
00197 }
00198
00202 double PlayerSettings::getPlayerWhenToTurnAngle( ) const
00203 {
00204 return dPlayerWhenToTurnAngle;
00205 }
00206
00211 bool PlayerSettings::setPlayerWhenToTurnAngle( double d )
00212 {
00213 dPlayerWhenToTurnAngle = d;
00214 return true;
00215 }
00216
00225 double PlayerSettings::getPlayerWhenToKick( ) const
00226 {
00227 return dPlayerWhenToKick;
00228 }
00229
00235 bool PlayerSettings::setPlayerWhenToKick( double d )
00236 {
00237 dPlayerWhenToKick = d;
00238 return true;
00239 }
00240
00245 int PlayerSettings::getPlayerWhenToIntercept( ) const
00246 {
00247 return iPlayerWhenToIntercept;
00248 }
00249
00254 bool PlayerSettings::setPlayerWhenToIntercept( int i )
00255 {
00256 iPlayerWhenToIntercept = i;
00257 return true;
00258 }
00259
00265 double PlayerSettings::getClearBallDist( ) const
00266 {
00267 return dClearBallDist;
00268 }
00269
00270
00274 bool PlayerSettings::setClearBallDist( double d )
00275 {
00276 dClearBallDist = d;
00277 return true;
00278 }
00279
00283 double PlayerSettings::getClearBallOppMaxDist( ) const
00284 {
00285 return dClearBallOppMaxDist;
00286 }
00287
00292 bool PlayerSettings::setClearBallOppMaxDist( double d )
00293 {
00294 dClearBallOppMaxDist = d;
00295 return true;
00296 }
00297
00300 double PlayerSettings::getClearBallToSideAngle( ) const
00301 {
00302 return dClearBallToSideAngle;
00303 }
00304
00308 bool PlayerSettings::setClearBallToSideAngle( double d )
00309 {
00310 dClearBallToSideAngle = d;
00311 return true;
00312 }
00313
00320 double PlayerSettings::getConeWidth( ) const
00321 {
00322 return dConeWidth;
00323 }
00324
00331 bool PlayerSettings::setConeWidth( double d )
00332 {
00333 dConeWidth = d;
00334 return true;
00335 }
00336
00340 double PlayerSettings::getPassEndSpeed( ) const
00341 {
00342 return dPassEndSpeed;
00343 }
00344
00349 bool PlayerSettings::setPassEndSpeed( double d )
00350 {
00351 dPassEndSpeed = d;
00352 return true;
00353 }
00354
00358 double PlayerSettings::getFastPassEndSpeed( ) const
00359 {
00360 return dFastPassEndSpeed;
00361 }
00362
00363
00368 bool PlayerSettings::setFastPassEndSpeed( double d )
00369 {
00370 dFastPassEndSpeed = d;
00371 return true;
00372 }
00373
00377 double PlayerSettings::getPassExtraX( ) const
00378 {
00379 return dPassExtraX;
00380 }
00381
00386 bool PlayerSettings::setPassExtraX( double d )
00387 {
00388 dPassExtraX = d;
00389 return true;
00390 }
00391
00396 double PlayerSettings::getFractionWaitNoSee( ) const
00397 {
00398 return dFractionWaitNoSee;
00399 }
00400
00407 bool PlayerSettings::setFractionWaitNoSee( double d )
00408 {
00409 dFractionWaitNoSee = d;
00410 return true;
00411 }
00412
00418 double PlayerSettings::getFractionWaitSeeBegin( ) const
00419 {
00420 return dFractionWaitSeeBegin;
00421 }
00422
00429 bool PlayerSettings::setFractionWaitSeeBegin( double d )
00430 {
00431 dFractionWaitSeeBegin = d;
00432 return true;
00433 }
00434
00440 double PlayerSettings::getFractionWaitSeeEnd( ) const
00441 {
00442 return dFractionWaitSeeEnd;
00443 }
00444
00451 bool PlayerSettings::setFractionWaitSeeEnd( double d )
00452 {
00453 dFractionWaitSeeEnd = d;
00454 return true;
00455 }
00456
00460 double PlayerSettings::getMarkDistance( ) const
00461 {
00462 return dMarkDistance;
00463 }
00464
00469 bool PlayerSettings::setMarkDistance( double d )
00470 {
00471 dMarkDistance = d;
00472 return true;
00473 }
00474
00479 double PlayerSettings::getStratAreaRadius( ) const
00480 {
00481 return dStratAreaRadius;
00482 }
00483
00489 bool PlayerSettings::setStratAreaRadius( double d )
00490 {
00491 dStratAreaRadius = d;
00492 return true;
00493 }
00494
00501 double PlayerSettings::getShootRiskProbability( ) const
00502 {
00503 return dShootRiskProbability;
00504 }
00505
00506
00514 bool PlayerSettings::setShootRiskProbability( double d )
00515 {
00516 dShootRiskProbability = d;
00517 return true;
00518 }
00519
00523 int PlayerSettings::getCyclesCatchWait( ) const
00524 {
00525 return iCyclesCatchWait;
00526 }
00527
00532 bool PlayerSettings::setCyclesCatchWait( int i )
00533 {
00534 iCyclesCatchWait = i;
00535 return true;
00536 }
00537
00543 int PlayerSettings::getServerTimeOut( ) const
00544 {
00545 return iServerTimeOut;
00546 }
00547
00553 bool PlayerSettings::setServerTimeOut( int i )
00554 {
00555 iServerTimeOut = i;
00556 return true;
00557 }
00558
00563 double PlayerSettings::getDribbleAngThr( ) const
00564 {
00565 return dDribbleAngThr;
00566 }
00567
00573 bool PlayerSettings::setDribbleAngThr( double d )
00574 {
00575 dDribbleAngThr = d;
00576 return true;
00577 }
00578
00579
00585 double PlayerSettings::getTurnWithBallAngThr( ) const
00586 {
00587 return dTurnWithBallAngThr;
00588 }
00589
00596 bool PlayerSettings::setTurnWithBallAngThr( double d )
00597 {
00598 dTurnWithBallAngThr = d;
00599 return true;
00600 }
00601
00606 double PlayerSettings::getTurnWithBallFreezeThr( ) const
00607 {
00608 return dTurnWithBallFreezeThr;
00609 }
00610
00616 bool PlayerSettings::setTurnWithBallFreezeThr( double d )
00617 {
00618 dTurnWithBallFreezeThr = d;
00619 return true;
00620 }
00621
00624 int PlayerSettings::getInitialFormation( ) const
00625 {
00626 return iInitialFormation;
00627 }
00628
00632 bool PlayerSettings::setInitialFormation( int i )
00633 {
00634 iInitialFormation = i;
00635 return true;
00636 }
00637
00642 double PlayerSettings::getMaxYPercentage( ) const
00643 {
00644 return dMaxYPercentage;
00645 }
00646
00652 bool PlayerSettings::setMaxYPercentage( double d )
00653 {
00654 dMaxYPercentage = d;
00655 return true;
00656 }