Write your own AI

It seems like every few days, we see a post with someone complaining about how the AI did something stupid in some circumstance. Sometimes these are accompanied with "I mean, how hard can it be?" type posts. A couple weeks ago, I posted to one of Brad's replies asking about letting those people put their coding where their mouth is by adding some AI APIs so people can write their own.

I didn't receive a single reply, but I kinda like the idea. Since I know that "customize the AI" is going to be a feature for Dark Avatar, it would be nice if there was an API.

Here is the post I made, I just want to see if anyone else would like to see it:

Hey Brad, is there a possibility of providing an API (the same API that the AIs would use to direct their turns) so that people who say "how hard can it be??!?!" can put their code where their mouth is?

I'm semi-serious here. If you were just wrap an IDL around whatever API your AI algorithms use and export them as COM objects and include some simple way (maybe just detailed via a config file) to get the game to load user-defined AIs, then we can really add to the game, I think.

You could get people trying to duke it out with other people's AIs. Not only would people realize just how hard it is to keep track of everything, but they could maybe come up with some creative ways of doing things that could be added back into the game.

I'm not suggesting publishing the source to your AIs, just give an API so the more geeky of us can attempt to write our own. And people could release their AIs to the Library (along with source, hopefully, so that other can tweak the good ones).

Maybe in an expansion pack, or GalCiv3?
9,335 views 4 replies
Reply #1 Top
I doubt many folks would have the patience to really do it, but if it could be done easily I think it would be pretty sweet. Especially if you could do it peace-wise, say write just a new version of this or that plug-in. (would limit what you could do, but would make things easier...)

Perhaps open it up, have contests and then give out prizes for the best ones. (and then incorparate them into the game.)

I would think something like 5 or 10 grand might make it worth while.

Reply #2 Top
Hey Brad, is there a possibility of providing an API (the same API that the AIs would use to direct their turns) so that people who say "how hard can it be??!?!" can put their code where their mouth is?


Consumers have the right to complain, consumers don't get paid to write AI or make games, game developers do, that's why consumers have the right to complain, and consumers have to complain about something or the game developers can't really do anything about bugs and AI issues, they can only improve the good parts of the game. If someone at Burger King screws up an order, they can't improve because no one told them they screwed up. Gamers aren't trying to insult the game or the makers when they complain, they are simply trying to suggest ways the game can be improved. Whenever I complain about something in the game I don't suddenly hate the game and its developers nor do I think they aren't good, I think this game rocks and so do the makers.
Reply #3 Top
Azrune, that's fair, but I don't think that's quite the point he was making. People are complaining and making suggestions without any real understand of the difficulty involved in what they're asking. People have a pretty good idea of how hard it is to make a double whopper (mmm... burger...), but apparently a lot have very little idea of how hard it is to write a game AI.
Reply #4 Top
Exactly V1m. I've read many posts where people complain about what the AI is doing and then they add something like "it can't be that hard". Well, it IS hard, and if it's something that's easy to expose, I think it would be awesome if we were given some APIs to write our own AI. I doubt most people would even think about it, but it might add some interesting twists to the game -- people could use someone else's AI to change things up a bit.