1 / 11

Heuristic Search in Empire-Based Games

Heuristic Search in Empire-Based Games. CS-470 Nathan Freeburg. Introduction. Goal Develop a hierarchical heuristic search algorithm to determine moves for a simple strategy game. Why heuristic search? Why hierarchical?. Heuristic Search. What is it?

smaximo
Download Presentation

Heuristic Search in Empire-Based Games

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Heuristic Search in Empire-Based Games CS-470 Nathan Freeburg

  2. Introduction • Goal • Develop a hierarchical heuristic search algorithm to determine moves for a simple strategy game. • Why heuristic search? • Why hierarchical?

  3. Heuristic Search • What is it? • Method of choosing branches in a state space which are more likely to lead to an acceptable solution to the problem. • Often implemented through minimax search.

  4. Search Example A A 2 2 B B C C D D -2 -2 -99 -99 2 2 E E F F G G H H I I J J K K L L M M 4 4 2 2 -2 -2 1 1 -1 -1 -99 -99 5 5 4 4 2 2

  5. Reducing the Search Space • A full search for a game with n pieces and m moves per piece, to a depth of d, requires examination of (m^n)^d separate states. • A full depth search for each piece, performed one at a time for all pieces, reduces the number of states to be examined to n(m^(d+1)). • Remember moves made by other pieces at the current depth.

  6. Algorithm Used • Choose a piece to focus on. • For all other pieces, perform a depth = 1 lookahead to determine best move at that level. • Perform a full depth lookahead for the chosen piece to determine the best move. • Repeat for all pieces.

  7. Constructing a Hierarchy • Split the decision making process into levels. • Determine overall strategy at the highest level. • Rule-based approach. • Determine the moves necessary to implement that strategy at the next level. • Heuristic search.

  8. Test Game • Loosely based on Empire, via Empire Lite. • Only resources are cities. • Advantage goes to attacker. • Two win conditions. • All opposing units eliminated. • All cities occupied by one side.

  9. Results • Hierarchical heuristic search outperformed non-hierarchical search. • Average move time was about 5 seconds for a lookahead depth of 8 on a 400 Mhz processor. • Still too high for mainstream applications, but promising.

  10. Further Work • At a superficial level: further tuning of the heuristics and tightening of the code. • Division of units into separate groups, each of which could be given different goals. • More robust set of rules for decision making at the top level.

  11. Conclusions • Hierarchical heuristic search preferable to non-hierarchical, despite increase in complexity. • Use in mainstream applications dependent on further increases in processing speed.

More Related