When Developing Resource Production in RTS games after some search i found two papers talking mainly in this topic(Online Planning for Resource Production in Real-Time Strategy Games, Extending Online Planning for Resource Production in Real-Time Strategy Games with Search). The System i'm working on is using Online CBR and CBP techniques but i'm trying to enhance the performance of the Resource Production planner the question is
Should the Resource Planner be:
1- "Independant Planner trying to maximize consumable resources according to some constraints and mathematical model"( somehow a combinatorial approach ).
2- "Plan generator (as introduced in the two papers i.e. given certain state and try to plan the best set of Actions to get to the Goal)".
[Question] Resource Production in RTS games
For Kohan 2, we didn't do any specific planning, but rather assumed that things were worth roughly what they cost. With that said, we did have a couple tricks for ensuring that the money went the right places...
We did have some build templates, which would guide our production (for instance, so that we would try to develop one settlement that could build the most powerful units, while setting the others up for economic development).
When considering building something, we would calculate it's economic value, but that looked at its change in our income (that is, how much upkeep does it cost per second, or how much income does it generate per second), while ignoring the initial build cost. The economic value would then be factored into the priority for building it, along with its military value and a host of other factors.
Finally, the one thing we did that sort of resembled planning (but not really) was what we called goal commitment. That is, if we had a high priority goal that needed some resources (say, 300 gold), and we didn't currently have enough gold to complete that goal, but at our current income rate we would have enough soon (i.e. within a minute or two) then we would not execute any lower priority goals until the high priority goal was completed. So for example, if we wanted to upgrade our settlement (which was a huge deal and critical to success), that typically was more expensive than the amount of cash we'd have on hand. However once our income reached the point that we could reasonably save for it we would, since that was also a very high priority goal to achieve.
More details can be found in my AI Game Programming Wisdom 3 article, if you're interested...
We did have some build templates, which would guide our production (for instance, so that we would try to develop one settlement that could build the most powerful units, while setting the others up for economic development).
When considering building something, we would calculate it's economic value, but that looked at its change in our income (that is, how much upkeep does it cost per second, or how much income does it generate per second), while ignoring the initial build cost. The economic value would then be factored into the priority for building it, along with its military value and a host of other factors.
Finally, the one thing we did that sort of resembled planning (but not really) was what we called goal commitment. That is, if we had a high priority goal that needed some resources (say, 300 gold), and we didn't currently have enough gold to complete that goal, but at our current income rate we would have enough soon (i.e. within a minute or two) then we would not execute any lower priority goals until the high priority goal was completed. So for example, if we wanted to upgrade our settlement (which was a huge deal and critical to success), that typically was more expensive than the amount of cash we'd have on hand. However once our income reached the point that we could reasonably save for it we would, since that was also a very high priority goal to achieve.
More details can be found in my AI Game Programming Wisdom 3 article, if you're interested...
@Kevin Dill
Your way of attacking the resource production problem is very interesting and I see that waiting for 2 or 3 minutes to get the 300 gold an issue that would be further enhanced.
As humans play a game, they try to maximize the production rather than instant production for a specific goal.
Your way of attacking the resource production problem is very interesting and I see that waiting for 2 or 3 minutes to get the 300 gold an issue that would be further enhanced.
As humans play a game, they try to maximize the production rather than instant production for a specific goal.
Well, they don't automatically wait whenever they have an expensive goal. They only wait if (a) they can save the money in a reasonably short amount of time (the amount of time is obviously game dependent - I honestly don't remember what value we used), and (b) that goal is the highest priority goal. It's a quick and dirty way to keep the AI from frittering its money away on small things, rather than waiting and building something big.
If you think about it, even building units requires something like this. The smallest and weakest unit is typically the cheapest, so if you always spent money on any goal that was available, you would only ever build that unit, because you'd never have enough money to build anything bigger. As soon as you got the money to build the wimpy little unit you'd spend it.
Planning is certainly an option, and has been used in RTS's - it just isn't what we did. I seem to recall that there was an article in AI Game Programming Wisdom 4 that described a planning approach to RTS AI. With that said, I'm not convinced that planning would necessarily get better results, and it's a good bit more complicated to code, balance, test, and debug.
It seems to me that what you really want is designer templates (which we had), which guides the AI toward a known good build order. You can even customize the build order for different characters, in order to get different personalities. For instance, a wood elf character might go quickly toward a sawmill and archer units, while dwarf character would build a smithy and axemen. That's not something that you will easily get out of a planner - it will always do what is "optimal," which may or may not be something that looks cool.
If you think about it, even building units requires something like this. The smallest and weakest unit is typically the cheapest, so if you always spent money on any goal that was available, you would only ever build that unit, because you'd never have enough money to build anything bigger. As soon as you got the money to build the wimpy little unit you'd spend it.
Planning is certainly an option, and has been used in RTS's - it just isn't what we did. I seem to recall that there was an article in AI Game Programming Wisdom 4 that described a planning approach to RTS AI. With that said, I'm not convinced that planning would necessarily get better results, and it's a good bit more complicated to code, balance, test, and debug.
It seems to me that what you really want is designer templates (which we had), which guides the AI toward a known good build order. You can even customize the build order for different characters, in order to get different personalities. For instance, a wood elf character might go quickly toward a sawmill and archer units, while dwarf character would build a smithy and axemen. That's not something that you will easily get out of a planner - it will always do what is "optimal," which may or may not be something that looks cool.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement