Boxing Agent Contender: BOACon
David W. Huang's AI Project

Contents
Domain
Illustration
Methods
Conclusions

Domain

BOACon tackles a turn-based "boxing" game where the agents take turns selecting from different actions and acting until one is defeated. The AI should be able to be modified modularly to accept new rules to the game. The primary AI related goal is to create something that can predict events and robustly act effectively even under false or failing precepts. The agent's more immediate goals constantly change from relying on the textbook response versus a higher level response based on prediction and strategy. Winning the bout is somewhat external to these specific AI problems.

The rules for this game are fairly simple. There are six locations, sitting in a line, five of which the AI can occupy at any time (the far corner would be occupied by the opponent making it impossible for the AI to be there). The AI can never pass through or occupy the same location as its opponent. Putting the opponent on the ropes or in the corner is desirable. An agent can take a certain amount of hits before it's defeated, ending the game. An agent can make the following moves if it is its turn:

  • Advance - Move one location towards a space is not occupied by opponent
  • Jab - Remove one unit from opponent's Life plus any location bonuses
  • Straight - Force opponent to move back a space and remove a unit of Life
  • Hook - Removes two units of life but has a 25% probability of not hitting
  • Uppercut - Removes three units of life at the cost of the AI's next turn
  • Wait - Do nothing except give up turn to opponent


    Illustration

    Um... it doesn't work.


    Methods

    Generate a search space of all possible plans (starting with the initial critera and ending with the death of one agent or another and no more than X moves in depth- to avoid plans with lots of Waits) arranged according to the likelihood of of the opponent's actions. The most likely plan is picked with the tie-breaker being the goodness of the situation (a more advanced AI would also consider the reverse case- What is the best situation a plan can generate and which of these is sufficiently likely?- then weigh the "prudent" plan- focused on probability- against the "gamble" focused on gain)... if still a tie, simply pick the first choice. The AI acts upon the first action in the plan, outputs the action to the screen, gives up its turn, and the process repeats until one agent runs out of life- the one left standing declared winner.

    The predominate technique used for this program would be planning and search. The focus is on the creation of a searchable data structure of plans and selecting the optimal choice. The agent would most benefit from the addition of learning algorithms, so that the agent could make hypotheses about uncertain precepts.


    Conclusions

    I had quite a few problems with the final implementation of this. The two largest issues were segregating plan from action and variability. The former is easier to explain. The AI in selecting a plan based on goodness, would effectively be predicting what the opponent's next turn- most favorable to the AI, not the opponent- would be and then, if that course of action was taken, it would effectively be taking the opponent's turn for it.

    The second major pitfall was variability. While it was not difficult to randomize the success or damage of moves, it was difficult to make valuable predictions (partially linked to the previous issue) without making too many decisions that seem hardwired. Randomized damage would have exploded the plan search-space the way I have it setup, so I avoided that. And while success is random, it was based upon fixed probabilities so while the agent can handle different situations, it seems to act on one and only one best solution for any given situation (despite finding several solutions). Another area where I hoped to gain variability was in false or failing precepts... something like a punch drunk simulator. The hope was to have the agent recognize that its belief in the world was not totally accurate. However, I couldn't figure out how to add this. I'm really bad at coding, sorry.

    A final more general problem was the poor selection of a domain on my part. It's fairly difficult to see if prediction or planning is working in a domain where a randomized reflex agent could possibly general similar results. One may not be able to tell if that Straight was the start of a planned combination or if the AI simply picked something out of desperation. Success is difficult to gauge, strategy is hard to recognize.