Archive for category Artificial Intelligence
Google AI Challenge – Galcon AI
Posted by Ceasar Bautista in Artificial Intelligence, Games, Real Time Strategy on 2010/09/23
I don’t actually own an Android device, but I was looking into developing apps for them and stumbled upon Galcon, which had brought the Flash RTS game to mobiles (I’m going to have to redefine the genre). Upon clicking the site, I found the Google AI Challenge, which is basically a competition to create the best AI utilizing the APIs that the developers provided. I haven’t looked into it much yet, and unfortunately I found it only today when the contest ends on Monday, but I am excited to see what comes of it.
Potential Fields
Posted by Ceasar Bautista in Artificial Intelligence, Games, Real Time Strategy on 2010/07/19
So while surfing for a solution to my own AI problems, I found an article on potential fields. I had used these before in trying to develop an AI for Naval Commander, and achieved limited success, but I couldn’t figure it out well enough and so I ditched the whole thing.
Anyway, a potential field is kind of like a magnetic field. Basically, the AI places charges around the map, positive charges near high value targets, and negative ones around dangerous areas and impassable terrain. Allied units use the field by testing a few points around them, figure out where the most potential is, and moving toward the location. By strategically placing the charges, the AI can guide armies in a very dynamic and simple way.
So here our potential field is represented by the lightness of the square, with light squares being more attractive. The rocks, being impassable, and the white enemies, being dangerous, emit negative potential, coloring the nearby squares dark, while the goal areas emits positive potential, lighting the map up. Together, these fields provide a way for the green unit to get to its destination all without any kind of path finding algorithm.
The article goes on to explain a few useful tricks, such as placing positive charges on top of enemy units to attract allied units to them, and then placing a weaker negative charge on top of them in order to get our units to attack from a certain range. Anyway, I think there is a lot of potential with this idea. I highly recommend you check the article out and you can count on me investigating the idea in the future.
(A thunderstorm won’t let me embed the link. Check it out here for now: http://aigamedev.com/open/tutorials/potential-fields/)
Command 0.04
Posted by Ceasar Bautista in Artificial Intelligence, Games, Real Time Strategy on 2010/07/19
This update is very minor, but it’s the start of something bigger, of which I’m having trouble with. Basically, I’ve made it so that the AI tries to send the least amount of units to necessary to capture planets. Unfortunately, it only works with terminal nodes:

The new AI works by allowing each planet to store the number of armies that it needs to conduct the AI’s plan. It sends that value to it’s parent node, and that goes all the way up, so that all the nodes know how much they need to conduct the AI’s plan.
The image at the right is a little hard to read, but basically, node A tells B that it needs 2 armies, then B tells E that it needs 10, 2 to capture A and 8 to capture itself. The process, repeats upward.
This works for terminal nodes, so why doesn’t it work for B? The problem, I’m almost certain, is that I’m using a depth first search, and A is never being notified that B is receiving enough forces to capture A. Now that would be very easy to fix, except that if I did that, then E would never send to B, since it would consider A and B both captured.
Anyway, I need some help.