CBRAgent


Case-Based Reasoning (CBR) is the process of intelligently solving new problems based on the previous similar problems. The basic steps of CBR are retrieve, reuse, revise and retain. First, CBR retrieves the most relevant case to the current problem at hand. The retrieved case is reused and revised to incorporate minor variations in the solutions. This adaptation step gives CBR a power to form more precise and accurate solutions to the future problems. Finally the revised solution is retained for future use.

The case was represented using ten parameters (the closest food, enemy and obstacle, the density of food and enemies, the ratio between the agents health and the opponents, and parameters determining the actions currently available to the agent). A weighting scheme was used to emphasize the more important features. We have identified 19 historic cases that are selected based on the performance of agent in the training simulations. Even with the small number of cases, the CBR-based agent shows drastic improvement over the random behavior and can be refined by adding more specific cases to the library. The selection of the case was done with a distance matrix based selection. The reliability of the case based on the previous failures is used as a weight in order to encourage the selection of variety of cases. The reliability of the case is dynamically adapted depending on whether the case can or cannot be successfully applied to the current situation.
  After the action to be performed is selected by the CBR module, a set of heuristics are used to adapt the action to the current environment. First, the heuristic module checks whether the proposed action is doable. In case of failure, the reliability measure of the case which proposed the action is reduced. The reliability of the case is used as a weight during the calculation of the distance matrix, so that case with the less reliability will have greater distance in the subsequent cycles. The second heuristic calculates the direction and the speed of the agent movement. For instance, eating a food item requires the direction toward the food and appropriate setting of the speed such that the agent stops at the food item.

 
   
Author: Jin Lyu