CAI
Moderators: hoijui, Moderators
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
CAI
The unimaginatively named AI that plays CA. It's a non-cheating luaAI that beats other AIs (and occasionally Carrepairer) at CA. (There aren't any AIs that have a good config for CA)
I was spurred into action by Kingraptor's difficulty in creating a decent CA config for Shard. So CAI uses a few CA specific things because it seems impossible to do with configs for other AIs.
There are a few known issues, it's work in progress.
I was spurred into action by Kingraptor's difficulty in creating a decent CA config for Shard. So CAI uses a few CA specific things because it seems impossible to do with configs for other AIs.
There are a few known issues, it's work in progress.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: CAI
Yep, it's also more recent than latest stable.i guess, it comes packed with CA in latest versions (eg, using SpringDownloader)?
Re: CAI
Seemingly, that's the latest available on http://files.caspring.org
I guess someone stopped updating it.
I guess someone stopped updating it.
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: CAI
Archives aren't provided anymore for test versions. You need to use Spring Downloader (or this script).
Re: CAI
This probably isn't the best place to post this but here it. Its happened twice in a row on 64 bit linux build when running this AI. The build was built from latest git source.
Translated Stacktrace:
/home/build/games/spring/rts/System/Platform/CrashHandler.cpp:283
??:0
/usr/lib/gcc/x86_64-manbo-linux-gnu/4.4.1/../../../../include/c++/4.4.1/ext/new_allocator.h:105
/home/build/games/spring/rts/Sim/Path/PathEstimator.cpp:575
/home/build/games/spring/rts/Sim/Path/PathEstimator.cpp:537
/home/build/games/spring/rts/Sim/Path/PathEstimator.cpp:473
/home/build/games/spring/rts/Sim/Path/PathManager.cpp:167
/home/build/games/spring/rts/Sim/Path/PathManager.cpp:87
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:1168
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:1253
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:1352
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:474
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:442
/home/build/games/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp:949
/home/build/games/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp:576
/home/build/games/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp:406
/home/build/games/spring/rts/Sim/Units/CommandAI/CommandAI.cpp:725
/home/build/games/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp:282
/home/build/games/spring/rts/Lua/LuaSyncedCtrl.cpp:2502
/home/build/games/spring/rts/lib/lua/src/ldo.cpp:319
/home/build/games/spring/rts/lib/lua/src/lvm.cpp:609
/home/build/games/spring/rts/lib/lua/src/ldo.cpp:377
/home/build/games/spring/rts/lib/lua/src/ldo.cpp:119
/home/build/games/spring/rts/lib/lua/src/ldo.cpp:464
/home/build/games/spring/rts/lib/lua/src/lapi.cpp:843
/home/build/games/spring/rts/Lua/LuaHandle.cpp:226
/home/build/games/spring/rts/Lua/LuaHandle.cpp:253
/home/build/games/spring/rts/Lua/LuaHandleSynced.cpp:718
/home/build/games/spring/rts/Game/Game.cpp:3538
/home/build/games/spring/rts/Game/Game.cpp:3907
/home/build/games/spring/rts/Game/Game.cpp:2809
/home/build/games/spring/rts/System/SpringApp.cpp:911
/home/build/games/spring/rts/System/SpringApp.cpp:1057
/home/build/games/spring/rts/System/Main.cpp:63
Anyone seeing this?
Translated Stacktrace:
/home/build/games/spring/rts/System/Platform/CrashHandler.cpp:283
??:0
/usr/lib/gcc/x86_64-manbo-linux-gnu/4.4.1/../../../../include/c++/4.4.1/ext/new_allocator.h:105
/home/build/games/spring/rts/Sim/Path/PathEstimator.cpp:575
/home/build/games/spring/rts/Sim/Path/PathEstimator.cpp:537
/home/build/games/spring/rts/Sim/Path/PathEstimator.cpp:473
/home/build/games/spring/rts/Sim/Path/PathManager.cpp:167
/home/build/games/spring/rts/Sim/Path/PathManager.cpp:87
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:1168
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:1253
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:1352
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:474
/home/build/games/spring/rts/Sim/MoveTypes/GroundMoveType.cpp:442
/home/build/games/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp:949
/home/build/games/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp:576
/home/build/games/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp:406
/home/build/games/spring/rts/Sim/Units/CommandAI/CommandAI.cpp:725
/home/build/games/spring/rts/Sim/Units/CommandAI/MobileCAI.cpp:282
/home/build/games/spring/rts/Lua/LuaSyncedCtrl.cpp:2502
/home/build/games/spring/rts/lib/lua/src/ldo.cpp:319
/home/build/games/spring/rts/lib/lua/src/lvm.cpp:609
/home/build/games/spring/rts/lib/lua/src/ldo.cpp:377
/home/build/games/spring/rts/lib/lua/src/ldo.cpp:119
/home/build/games/spring/rts/lib/lua/src/ldo.cpp:464
/home/build/games/spring/rts/lib/lua/src/lapi.cpp:843
/home/build/games/spring/rts/Lua/LuaHandle.cpp:226
/home/build/games/spring/rts/Lua/LuaHandle.cpp:253
/home/build/games/spring/rts/Lua/LuaHandleSynced.cpp:718
/home/build/games/spring/rts/Game/Game.cpp:3538
/home/build/games/spring/rts/Game/Game.cpp:3907
/home/build/games/spring/rts/Game/Game.cpp:2809
/home/build/games/spring/rts/System/SpringApp.cpp:911
/home/build/games/spring/rts/System/SpringApp.cpp:1057
/home/build/games/spring/rts/System/Main.cpp:63
Anyone seeing this?
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: CAI
You're probably better off asking Kingraptor as he wrote the config. From what I saw of it playing each con had a build queue that it executed which was quite limiting.AF wrote:What exactly are the difficulties encountered with Shard?
No doubt this is an engine bug in the build you are using. Use the stable engine release to avoid the crash.echoone wrote:Error
Re: CAI
Each constrictor has a task queue, these task queues can be strings in the form you mention.
BUT
This system is implemented as a behaviour in lua, and can be completely replaced with any kind of construction system you want.
On top of that, as well as specifying a set of strings for a list, you can specify a lua function and return different things each time. And on top of that, you don't have to return a string! You can return a function that returns a string, so that you can do even more custom logic. But these are all feats of a system which itself can be ripped up and thrown out in favour of another system.
Eg in evolutionRTs there is a behaviour which makes engineers build defence turrets when under attack. this behaviour is completely separate from the tasks system.
BUT
This system is implemented as a behaviour in lua, and can be completely replaced with any kind of construction system you want.
On top of that, as well as specifying a set of strings for a list, you can specify a lua function and return different things each time. And on top of that, you don't have to return a string! You can return a function that returns a string, so that you can do even more custom logic. But these are all feats of a system which itself can be ripped up and thrown out in favour of another system.
Eg in evolutionRTs there is a behaviour which makes engineers build defence turrets when under attack. this behaviour is completely separate from the tasks system.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: CAI
That's not particularly descriptive. I know there are situations which it will make razor/packo. Which situations did you test?Licho wrote:It also fails against gunships (wont build razor kiss/packo)
Re: CAI
played around a bit and found it quite stable, did not crash so far.
also good (little) cpu usage.
plays ok. Noticed it seems to use artiellery as intended.
But it plays a bit aimless.
When 2 CAIs play against each other, this flaw becomes quite noticeable.
For example they can literally fight forever on a small 8x8 map (ie Barren) without any winner. Even after I /give 10 fusions to one CAI I noticed no progress after another 30 minutes. (game was already going for an hour)
Maybe it is because its units killing each other in the middle and in the case a few units get past, they are picked off by base defense.
So no damage done. At some point it needs to stop wasting units and tech/grow the base more and reclaim all the wrecks.
I also noticed it seems to create "fight groups" or something?
Ie a few dozen units that will stick together. Problem, after the fightgroup is almost dead the few survivors just keep doing the same stuff. Sometimes another 15 units are waiting in the base at the factory while the previous group is dying in the field. The groups should reinforce/help/join each other. I think failing to do this also makes the game go on for so long.
Also the commanders are a little stupid, as soon as 2 coms meet they stop and laser each other to death, dying at the same time.
also good (little) cpu usage.
plays ok. Noticed it seems to use artiellery as intended.
But it plays a bit aimless.
When 2 CAIs play against each other, this flaw becomes quite noticeable.
For example they can literally fight forever on a small 8x8 map (ie Barren) without any winner. Even after I /give 10 fusions to one CAI I noticed no progress after another 30 minutes. (game was already going for an hour)
Maybe it is because its units killing each other in the middle and in the case a few units get past, they are picked off by base defense.
So no damage done. At some point it needs to stop wasting units and tech/grow the base more and reclaim all the wrecks.
I also noticed it seems to create "fight groups" or something?
Ie a few dozen units that will stick together. Problem, after the fightgroup is almost dead the few survivors just keep doing the same stuff. Sometimes another 15 units are waiting in the base at the factory while the previous group is dying in the field. The groups should reinforce/help/join each other. I think failing to do this also makes the game go on for so long.
Also the commanders are a little stupid, as soon as 2 coms meet they stop and laser each other to death, dying at the same time.