Meet Eva


DirectX
I've reached the end with my DirectX exploration. I've had a glimpse into the world of professional game developers and this has gotten me ideas for my old project. Dungeon Keeper clone will have to wait.
Eva
Eva is a vitual girl who likes playing video games. Eva is short for EVRTSAI, evolved rts artificial inteligence. I thought I need to comeup with a name for the dreamland AI.
Organising the workplace
Eva is made up of two or three things. The conventional part of the project is the main map, the main map is not eva, the main map is just a place where two players compete and where one player is controled by eva. Secondly there is Eva's memory. Eva's memory is a place where things evolve when the enemy is out of sight. The third thing is the Testing options bit. So far Eva's memory and option testing or weighting is found on a second map.
Eva's memory
Eva has two working modes: "online" and "offline". Online is when the enemy is in Eva's line of sight. In this mode Eva is continuously reacting to the enemy, it is continuously weighting options as a result of enemy activity. Offline if when the enemy is out of line of sight, in this mode no testing takes place.
Imagine you're playing a RTS multiplayer game. When the enemy is covered in fog of war you make a plan first then you follow with that plan, you don't change taktics you don't take new decisions until you get the enemy in the line of site again. If you change taktics middle of the road it's a 100 percent subjective decision, it's not driven by objective factors. The question is is a statement like the one I just made acurate? The answer is it's acurate only half way. When I don't have new information about the enemy I'm running a latent player in Eva's memory. Generally speaking if I'm online and I don't do anything and the enemy makes a move I will have to test options to know how to react to his move.
and that will set me into motion I will have to do something after the tests a finished. If I'm offline and I don't do anything the enemy doesn't do anything either, there is nothing to test. But if I'm offline and I make an important move I need to test how the enemy will react to that move even if I don't have fresh information about him (the enemy). Here is an example. If I'm offline and I decide to build an expansion at some point while the enemy is still out of sight before I start building the expansion I will test my option against a PROACTIVE enemy. In this case basically Eva will build her expansion in her memory on fast forward before the expansion is actually built (on the real map) and then she will make the latent enemy attack the expansion.
Here is another example for what means a proactive enemy. In one of the previous blog entries I brought into discussion the problem of options and how you could test them. I made a drawing.
Blue quads is our units next to enemy base and they want to retreat. Running the options generator brings up three escape routes. Retreat option 3 has some enemy units on the route, the enemy units are the yellow quads. Now we simulate the retreat process and it turns out that retreat option 3 is a bad option. We're left with two good options. We chose one option and go by that route but what if the enemy starts moving? Well we can interupt the retreat process and run the simulation of retreat again to see if the route we`re following has been invalidated. Using this approach if a good route exists we can find it. But what if there are enemy units not just near the enemy base but on the other side of the ramps or bridges too. Lets say the units are quite some distance from the bridges not right next to them. Since those units are far we can not include them in the retreat simulation process and even if we include them they will not turn out as a problem, the distance is too great. But what happens is that when we start retreating those enemy units on the other side of the bridges start moving towards our retreat option location. And when our units reach the aparently good retreat location the enemy units will be there waiting them. Take a look at the second drawing.
The solution to this problem is that we use a virtual proactive enemy. Before we move units on the real map we run the retreat simulation first if the option turns out valid we match the enemy combat units against retreat option location. Basically we iterate through all known enemy groups and attack the retreat option location. On the second drawing there are two blue tanks deployed next to retreat option 1 location. When we match the enemy units against this retreat option the enemy group on the other side of the bridges will be destroyed by the tanks. Hence the retreat option 1 will emerge as the best retreat option. Note then when we are about to start moving the retreating units to one of the retreat options location we don't know if the enemy group on the other side of the bridges will move. There's a 50 percent chance they will move. Because of this retreat option 2 remains an aproximately good retreat option. But if we don't want to take any risks we will retreat by the route where the tanks are.
Generally speaking there are two cases when a position makes a good retreat option. When there are defending units of our own at that location and when the time for the retreating units to get there is shorter than the time required for enemy units to get there.
Discussion