Hello World Lua AI - Page 2

Hello World Lua AI

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: Hello World Lua AI

Post by Nemo »

Additionally, if you're not opposed to modifying an existing AI, tobi (former Spring lead dev) wrote an OO modular AI framework for Spring 1944, which Imperial Winter also used/uses. We just use it by providing game-specific config files, but the code is pretty clean and nicely broken into components, so you could probably use it as a basis for more interesting behavior (right now, CRAIG mostly just follows a build order config and sends groups of units to various waypoints on the map on the way to the player's base).

base files here:
http://sourceforge.net/p/spring1944/cod ... ets/craig/

game/map-specific configs here:
http://sourceforge.net/p/spring1944/cod ... igs/craig/

Interestingly, it runs primarily unsynced gadget code. His comments from the commit where it was rewritten to run unsynced:
* Major technical change: the AI now runs as unsynced code.
- CPU usage due to the AI happens only on one client, instead of all.
- AI is actually susceptible to network lag now, unfortunately.
- Desync bugs like the one in v2 can not exist anymore.
- Architecture is more similar to GlobalAI. (AI DLLs)
- There is a clear piece of framework code for building unsynced LUA AIs.
Post Reply

Return to “AI”