Sign in to follow this  

AI for Resource based RTS game...

Recommended Posts

I am designing this resources based strategy game for my masters project , and I have a few hurdles I am stuck on, for which I would greatly appreciate any kind of suggestion.
Game description: 4 kinds of resources- people, food, wood and houses. No graphics (so that I can actually spend time on AI, I may design on if I have time)... They all are linked and there are various connections. Eg: a house can have 3 people, people need food after every 1 minute, people are needed to grow food and cut wood as well, etc etc... I know this seems lame and can easily fit an equation. So, for making it interesting I included earthquakes and random things (u can imagine ... though this is lame too ).
1: How to should I approach AI ?
Sol.s I have got from people I know : Go for a GA and optimize every move.... or put them in a table and design FSA for them. Etc etc

At this point, I have plenty of time, and I am a bit confused. I have thought of making two AI players and make them play against a human player or among each other. My basic aim is to see how actually AI comes up in modelling the strategy of the game... or say modelling life ( maybe).

I know I am a beginner.
Apologies if I have written or done something wrong, but please don't crash on me with your critics on my post.


Share this post

Link to post
Share on other sites
[quote name='IADaveMark' timestamp='1311527932' post='4839658']
Might need a bit more of a picture of the game. Turn-based? Real time? What is the goal condition?

Also, what kind of "people do you know" that recommended a GA?

I am trying for a real time... but at the same time I am stuck in threads ... I am using java. The goal will be to reach the peak of resources and population after a certain time.
My project tutor recommended me a GA. He said me to put the resources in a table and then optimize it to find the best move.
My main motive is to observe how a classic AI can come up with modelling real life through this game. ( Real life is a too much of a comparison but in essence to my idea where I want to design some intelligent behavior)
I don't know what extent I will reach to... hope this suffices in order to provide me some suggestions..

Share this post

Link to post
Share on other sites
1.) What is the game's [i]state space[/i]? I.e., what is the smallest collection of variables you'd have to write out to a savegame file in order to close the program and resume your game later? Is the state simply the 4-vector ([i]people, food, wood, houses[/i])[i]?[/i] Or is there more?

2.) What is the game's [i]action space[/i]? I.e., at each timestep, what is the complete list of choices available to the player? Is it {make_person, grow_food, cut_wood, build_house}? Or are there more (actually, I guess you can choose how many of each to build at each step, and this is a function of the number of people available?)? Is there any spatial component to the game; i.e., are the trees, and the houses, and the people, located somewhere on a map, and is this something we need to think about?

3.) Do you have an opponent, and what is his role?

Fundamentally, if you have no opponent, then your game is a Markov Decision Process. If your state space really is just four-dimensional, then you're still (barely) within the realm where you can just solve your problem directly with Value Iteration. If your state space is larger, you may need to consider Approximate Dynamic Programming. See the book [i]Neurodynamic Programmng[/i] by Bertsekas (forgive the implicit reference to ANNs in the title; they were trendy when it was written. In reality, it uses linear function approximators).

If you have an opponent, then it is a Markov Game. These are more expensive to solve than Markov Decision Processes, so you may also need to turn to Approximate Dynamic Programming.

A third approach is variational. The idea here is only to optimize over an open-loop control input profile vs. time, using a gradient-descent-like procedure. It helps to have a good initial guess here, so you'd need to give the problem some thought yourself. Perhaps there are simplified versions of the problem you could solve in closed-form, which would inform your choice of initial guess for such a procedure.

Eventually, for your thesis, I'd say you should have a formal description of your game involving a state space an action space, so I think that writing down what these are would be a god first step.

Share this post

Link to post
Share on other sites
Thanks for a great reply sir. It is really good to know I have so many things to work on. I could have given you a description, but for now it is better if I work on the things you have said.

thanks again.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this