This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: AI (was error handling)


Sigh, iwon's inline formatter is the pits.

So I'll place my comments at the end, rather than attempt to remormant this whole message to interleave my comments.

 --- On Wed 01/08, Hans Ronne  wrote:F
rom: Hans Ronne [mailto: hronne@telia.com]
To: sutton@earthdecision.com
     Cc: xconq7@sources.redhat.comDate: Thu, 9 Jan 2003 01:55:25 +0100
Subject: RE: AI (was error handling)
> But if you have advances that require a colonizer or engineer to build>
something indirectly you seem to get into dead ends.  Maybe an
>enhancement might be to have a counter, and if a unit does the reserve
>action n times in a row, it forces it to do something else, or use an
>alternate selection process to assign an action or plan to it?

Indeed. The simple solution is of course to have two unit types in the
game: colonizers that build citites and engineers that build other stuff.To some extent, game design must reflect what the kernel (and the AI code)
really can do.

>One thing I've noticed in several games is that the path determination>doesn't seem to work very well in a lot of cases.  I've seen hundreds of>units massed in the curve of a continent near an enemy when there is a>land path to the enemy that it never seems to find.  Do we use an A*>path algorithm for path determination?This is true, and it has been discussed several times before on this list.Ed Oskiewicz (if I remember correctly) had some ideas about a new pathalgorithm to try, but it was never tested. If you want to give it a try,please go ahead.>And the other situation I've seen is where the AI has conquered the>entire world, except for a raft I had in an inland sea.  It had several>cities on the sea, but either didn't or couldn't build a sea going>attack craft to destroy the one remaining enemy unit on the board.  I>probably should have saved the game so I could run the debug and see why>it wouldn't desroy me, but I didn't think of it at the time.  I was just>seeing if the game seemed to still work after making come documentation>changes.True. Typically happens in the LOTR game, if the good guys defeat the badguys. There is always this dromund left in the Sea of Rhûn ...The way the code works right now is that marine units are built sometimes,at random, in cities that have at least one water cell that borders onanother water cell.  So if you wait long enough, it will build a ship. Butthe AI could be smarter about this, I agree.Hans


So on my todo list, I need to add:

Add comments to the Game Developer's Manual about typical design problems and the current work arounds.

Write an A* path algorithm

Study the current mplayer, add some code, and cocument it in the Hacking Manual.

Debug and document the supply code which I wnat to use for a game I'm working on.

Write a new aI from scarch, and document in the Hacking Manual.




Now if I could just find someone to hire me, pay me a princely salary, and put me to work developing Xconq full time. :-)

As I remeber, there is a fair amount of information about of imformation on the web about A* path code, and even some freely redistributable code, as long as the author is attributed.  It's fairly staight forward/  Start at the destinaltion, push all paths leading into the destination onto a stack, along with the cost to move from that location to the destination, along with an estimated cost to get from the starting point to the cvurrent point.  Select the least expensive direction.  Repeat.  Take advantage of stored information if you wind back at a previously claculated location, as well as pruning the tree so you don't duplicate a path.   If you get to a place with no available unexplored paths, back up the tree until you get to an unevaluated path.  you can either stop when you get to the destination, or continue until you evalualte all paths, or put in a cutoff for paths that continue to increase in cose for a set number of moves.  This allows you to find roadways, transports, etc. that may be initally moving away from your starting point, but which get you there faster by making a delay.  Adding costs of dynamic things like enemy ZOCs, engineers/colonizers building things, advances, syooky considerations, etc.  make things more complicated, of course.

_______________________________________________
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]