sp {propose*wander (state ^name tanksoar -^sound ^io.input-link ) ( -^radar.tank -^incoming. yes) --> ( ^operator.name wander) } sp {propose*attack (state ^name tanksoar ^io.input-link.radar.tank -^missiles-energy low) --> ( ^operator + =) ( ^name attack)} sp {propose*chase (state ^name tanksoar ^sound -^io.input-link.radar.tank -^missiles-energy low) --> ( ^operator.name chase)} # If the state is tanksoar and the sound sensor # is not silent or there is a tank on radar or there is an # incoming missile, and health is low or the energy is low, # then propose the retreat operator. sp {propose*retreat*sound (state ^name tanksoar ^missiles-energy low ^sound) --> ( ^operator + =) ( ^name retreat)} sp {propose*retreat*radar (state ^name tanksoar ^missiles-energy low ^io.input-link.radar.tank) --> ( ^operator + =) ( ^name retreat)} sp {propose*retreat*incoming (state ^name tanksoar ^missiles-energy low ^io.input-link.incoming. yes) --> ( ^operator + =) ( ^name retreat)} # If the state is tanksoar and the tanks is under # attack but cannot not directly sense the other tank, # then propose the retreat operator. sp {propose*retreat*incoming*not-sensed (state ^name tanksoar -^sound ^io.input-link ) ( ^incoming. yes -^radar.tank) --> ( ^operator + =) ( ^name retreat)}