what happens at the end of 10 turns? or are you just saying how long a typical combat might take?
how long do you figure a player might take to move his units? this sorta affects how long they might be willing to wait for the computer to make its move.
is retreating different than moving away from enemies?
are moves resolved at the same time or on alternating turns? that is does the computer get to move all of its units and have the results happen before the player gets to move? if the actual moves happened simultaneously, then you could possibly have the AI working while the player was formulating his moves.
for example, if they each have 10 units, the player issues his orders and hits "go". meanwhile, the computer is figuring out its orders. the orders are then resolved simultaneously. you''d have to sort out what happens when a unit attacks a unit that is no longer where it was or two units attempt to enter the same hex. it would be easy enough to consider attacking implied by movement -- that is, if you move into an area occupied by an enemy, you attack it.
simply scoring the current state of the game and iterating thu all possible state changes is one way to go, but given the number of units and the range of motion of each, it might be pretty painful. a unit that can travel 4 hexes would have 61 possible positions to check. throw in attack range and you''ve got another large number of possible moves (dunno if you have attack range). but let''s say there is no attack range. that means that you''d have a potential of say on average 20 possible moves for each unit (blocked terrain, occupied hexes, less mobile units). so figure you''d need to score 400 game states (20 potential moves * 20 units) to pick the best move. but that''s with no real looking ahead. you''d need to score 400^2 game states to pick the best move based on a predicted player move (how you predict the player move is a nice way to tune your game''s AI, but however it happens, it''ll likely be based on the same number of potential game states). 400^3 state scores would let the computer start to form overall strategies (two move combos) and 400^4 would give the computer the ability to react to the player doing the same. but of course, then you''re up to like 25 billion test moves.
i have absolutely no clue how fast your system is. a simple way to guage things would be to come up with a simple scoring system and see how many random moves you can score in however long you figure the computer should think about things. that would answer the question of whether the exhaustive method would work out for you. or perhaps, just how exhaustive you can be.
you could conceivably reduce the number of potential moves each unit makes by adding a random factor to the move tester. perhaps the AI limits the number of potential moves based on how much action is going on in a perticular area -- if there''s heavy fighting, those units are given more breadth to search for a good move. if there''s not much going on for a particular unit, then the number of potential moves is reduced and perhaps selected from the full set of potential moves at random.
just some thoughts...
Tactical AI for Wargame
quote:
Original post by Woody FX
The platform I’m working for is very limited.
No Floating-point calculations.
33mhz cpu.
256kb(yeah kb) of Heap space. (the total game needs to be just under 52KB)
[edited by - Woody FX on January 16, 2004 8:24:35 PM]
That means your ideas wont work because of the system requirments he has. And besides i think his game is the player moves, then the computer. NOT together
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement