55 DEFINE_PLAY_UPDATE_STRUCT_WITH_CONTROL_AND_COMMON_PARAMS
90 void avoid(
const Update& event);
101 using namespace boost::sml;
103 DEFINE_SML_STATE(WaitState)
104 DEFINE_SML_STATE(AvoidState)
105 DEFINE_SML_STATE(DefenseState)
107 DEFINE_SML_EVENT(Update)
110 DEFINE_SML_ACTION(
avoid)
116 return make_transition_table(
118 *WaitState_S + Update_E[hasPlacementPoint_G] / setPlacementPoint_A =
120 WaitState_S + Update_E[!hasPlacementPoint_G] = WaitState_S,
122 AvoidState_S + Update_E[!isNearlyPlaced_G] / avoid_A = AvoidState_S,
123 AvoidState_S + Update_E[isNearlyPlaced_G] = DefenseState_S,
125 DefenseState_S + Update_E[isNearlyPlaced_G] / enterDefensiveFormation_A =
127 DefenseState_S + Update_E[!isNearlyPlaced_G] = AvoidState_S);
131 TbotsProto::AiConfig ai_config;
132 std::array<std::shared_ptr<CreaseDefenderTactic>, 2> crease_defender_tactics;
133 std::array<std::shared_ptr<AvoidInterferenceTactic>, 6> avoid_interference_tactics;
134 std::array<std::shared_ptr<MoveTactic>, 3> move_tactics;
135 std::shared_ptr<GoalieTactic> goalie_tactic;
137 Point placement_point;
138 double distance_to_keep_meters;
139 double nearly_placed_threshold_meters;