[3.1+] NullBot: an adaptive skirmish AI
-
Cyp
- Evitcani

- Posts: 784
- Joined: 17 Jan 2010, 23:35
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
Why is chat necessary for teamplay? Would probably make sense if it tried helping without being asked, since it might not understand humans chatting on the same team, anyway. (Unless you're implementing a natural language parser.)
It's good at taking oil, but it might be better if it spent more efforts on taking oil on its half of the map (while the other team takes oil on its side of the map, instead), and less efforts on taking oil in its allies' bases.
It's good at taking oil, but it might be better if it spent more efforts on taking oil on its half of the map (while the other team takes oil on its side of the map, instead), and less efforts on taking oil in its allies' bases.
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
Helping in defending the bases doesn't require chat, but concentrating attacks does, i think. I might have a look.Cyp wrote:Why is chat necessary for teamplay? Would probably make sense if it tried helping without being asked, since it might not understand humans chatting on the same team, anyway. (Unless you're implementing a natural language parser.)
Well, probably i need to add an exception. The definition of the "oil in allies' bases" is pretty vague though. How would you define it?Cyp wrote:It's good at taking oil, but it might be better if it spent more efforts on taking oil on its half of the map (while the other team takes oil on its side of the map, instead), and less efforts on taking oil in its allies' bases.
Last edited by NoQ on 22 Mar 2012, 10:57, edited 1 time in total.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
Flail13
- Code contributor

- Posts: 263
- Joined: 16 May 2008, 12:00
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
One way is to find the AI's closest truck to the oil in question, then find the closest allied truck to the same oil. If the AI's truck is closer than the ally's then it tries to build on it. - I tried to make a skirmish AI once.NoQ wrote:The definition of the "oil in allies' bases" is pretty vague though.
-
Cyp
- Evitcani

- Posts: 784
- Joined: 17 Jan 2010, 23:35
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
An arbitrary formula, no idea if it's any good:NoQ wrote:...Well, probably i need to add an exception. The definition of the "oil in allies' bases" is pretty vague though. How would you define it?Cyp wrote:...
A = min(distance from allies to oil)
E = min(distance from enemies to oil)
S = distance from self to oil
f = min(max(1/S - 1/A + 1/E, 0.5/S), 1.5/S)
And then prefer oils with large values of f. There's probably better formulas.
Don't know what the best way of defining the distance from allies/enemies/self is, since bases sometimes need to be relocated suddenly.
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
v1.08
Changes:
Changes:
- Don't take allies' oil (picked Flail13's solution ... works fairly well, didn't try Cyp's one though >.<)
- Make use of transfered units (eg., if you give him a truck, it will actually build things with it)
- Use the workaround code from v3.1 even on master/3.2+ when it comes to sending units for repair (v3.1 code is known to have some nice features, like retreating to allies' repair centers and repairing VTOLs at repair centers)
- Regroup a bit more often after all
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
aubergine
- Professional

- Posts: 3462
- Joined: 10 Oct 2010, 00:58
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
Motorways are clear, no traffic jams to report 
Although my gameplay has changed drastically - I no longer turtle! I blame NullBot (:
Although my gameplay has changed drastically - I no longer turtle! I blame NullBot (:
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
-
JDW
- Regular

- Posts: 1669
- Joined: 18 May 2010, 20:44
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
On a 5 (4 NullBots + Me) vs 5 (Humans) game, we found a few places where it could improve,
At one point one of the bots had forgotten to build a power generator and so I had to lend him power (which he has yet to return to me btw) .
Another thing it failed at was building modules even though it had it researched.
At one point one of the bots had forgotten to build a power generator and so I had to lend him power (which he has yet to return to me btw) .
Another thing it failed at was building modules even though it had it researched.
You do not have the required permissions to view the files attached to this post.
"Speak when you are angry and you will make the best speech you will ever regret."
-- Ambrose Bierce
-- Ambrose Bierce
-
Berg
- Regular

- Posts: 2204
- Joined: 02 Sep 2007, 23:25
- Location: Australia
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
not to put off topic into threaqd but can the bot also control scavs by default?
Just an idea
Just an idea
-
aubergine
- Professional

- Posts: 3462
- Joined: 10 Oct 2010, 00:58
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
Scavs are controlled separately by scavfact.js, in theory it could control scavs but scav's don't have a truck to build stuff, or research labs to learn tech.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
-
Berg
- Regular

- Posts: 2204
- Joined: 02 Sep 2007, 23:25
- Location: Australia
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
scavs dont have a lot so lets give it them.
anyway its just a idea prolly need its own thread
anyway its just a idea prolly need its own thread
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
The same would have happened after your first day in multiplayer, but since you didn't want ...Although my gameplay has changed drastically - I no longer turtle! I blame NullBot (:
The main problem is that while modifying AIs is about adding files, modifying scavengers is about replacing. So NullBot installation doesn't modify any existing data, which brings many benefits, but if i start working on scavfact.js, these benefits will vanish.Scavs are controlled separately by scavfact.js, in theory it could control scavs but scav's don't have a truck to build stuff, or research labs to learn tech.
Another thing it failed at was building modules even though it had it researched.
I will have a lookAt one point one of the bots had forgotten to build a power generator and so I had to lend him power
May i ask if there were any console/stderr messages? Cause every time at least one console/stderr message appears from nullbot, it is worth investigating.
Lol, btw, maybe i should make them repay(which he has yet to return to me btw)
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
v1.09.
Changes:
Changes:
- React on scavengers properly (lol, with the new scavenger mod, i had to fix NullBot to make it survive from time to time).
- Fix: don't stop building modules when unable to complete the build order due to lack of space or due to danger or something like that.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
v1.10: yet another little bugfix release.
These little bugfix releases show that i'm pretty much satisfied with NullBot. Chat, unit/money transfer and improved gateway support are the nearest features planned, but they 1. won't work in 3.1 anyway and 2. their development is currently blocked by #3366.
Another obvious plan is to make a scavenger AI, based on the one used in the ultimate scavenger mod, but simplified to agree with the current game rules (that is, only scavfact.js is modified).
- Works correctly when given no trucks at start (at least don't crash, and try to do whatever we can).
- Consider combat engineers when trying not to take allies' oil (they were not captured in enumDroid(me,DROID_CONSTRUCT) call).
- Remove dynamic number of groups support from the code (it is dynamic enough even without it).
These little bugfix releases show that i'm pretty much satisfied with NullBot. Chat, unit/money transfer and improved gateway support are the nearest features planned, but they 1. won't work in 3.1 anyway and 2. their development is currently blocked by #3366.
Another obvious plan is to make a scavenger AI, based on the one used in the ultimate scavenger mod, but simplified to agree with the current game rules (that is, only scavfact.js is modified).
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
Goth Zagog-Thou
- Regular

- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
Great job on the AI, NoQ. It kicks my butt nicely, every time.
-
Giani
- Regular

- Posts: 804
- Joined: 23 Aug 2011, 22:42
- Location: Argentina
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
There are different types of Nullbots for choosing weapons? For example, 1 type of Nullbot always uses mg+cannons and other Nullbot uses rockets+flamers. Or Nullbot randomly chooses the combination of weapons?
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501