GamerAgent


Game theory is a mathematical formulation of cooperative or competitive interaction between multiple entities. The key concern in game theory is to extract rational (optimal) behavior from a given interaction between autonomous agents. We model the FFM world as a zero-sum game.

Our game theoretic model consists of a game matrix. The game consists of two entities, and each one of them can choose from two strategies 1) attack or 2) flee. The utility functions for each strategy is based on two parameters 1) Difference in energy level and 2) Likelihood of attack or flee by the other agent based on previous interactions.

We will denote 'Ua,b' the utility of taking action 'a' when the opponent agent takes action 'b' (where the actions can be 'A' for attacking and 'F' for fleeing. We note with δ the ratio of energy levels of the current and opponent agent, and 'mu' the likelihood of attack by the opponent agent. Each utility function is defined as follows:


where


Given the matrix, the optimal strategy is chosen by summing up the utility for each strategy. The strategy that provides the maximum utility is then chosen as the optimal strategy.
  Several heuristics were used to guide the agent to explore the map and eat available food. The expert agent uses an internal data structure representing the perceived game map as a base for the heuristics.

Heuristic 1: IF the agent is not able to eat since last 20 to 100 simulations and there is no food or other agent in sight THEN move to the least explored direction on the map for 50 simulation steps.

Heuristic 2: IF the agent is not able to eat since last 100 to 200 simulations and there is no food or agent in sight THEN obtain two random directions (which are non-opposite to each other), and move in those directions for 200 simulation steps.

Heuristic 3: IF there is more than one agent in the sensor range THEN flee in the direction which has the least number of agents.

Heuristic 4: IF the agent energy level reaches 35000*mateEnergyFactor and there is no agent or food in sensor range THEN multiply and increase mateEnergyFactor by 0.2.

Heuristic 5: IF food is visible in the sensor range and no agent is visible THEN approach the food and eat it.


 
   
Author: Majid Ali Khan