Unfortunately, I don't think that will work in true multiplayer mode.Artofeel wrote:For my AI (I'm working on) I did this:aubergine wrote:The C++ code in warzone is hard-coded to prevent AI players from picking up oil barrels or artefacts. So even if the AI sees one and tells a truck to pick it up, Warzone just ignores the request![]()
...
[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+
-
Artofeel
- Greenhorn
- Posts: 7
- Joined: 10 Feb 2012, 15:32
- Location: Russia
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
and why? there is some big difference between multiplayer and skirmish?Cyp wrote:Unfortunately, I don't think that will work in true multiplayer mode.
-
Cyp
- Evitcani

- Posts: 784
- Joined: 17 Jan 2010, 23:35
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
Number of clients. Don't think there's any message for changing the power a player has, so if a client adds 100 power to a player, the other clients wouldn't see the power, and the game would go out of synch. If there's only one client, it doesn't matter much if the game goes out of synch, since there's no other clients to notice.Artofeel wrote:and why? there is some big difference between multiplayer and skirmish?Cyp wrote:Unfortunately, I don't think that will work in true multiplayer mode.(excluding number of human players)
Try using DORDER_RECOVER in any version containing 8949148a9ddbf92ecc3fb2b4ddcd0e74d849be5c, such as v3.1_beta5 (you will need a time machine to travel to the future to download it, though).
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
I think he's simply afraid to rebuild because there are enemy (aka your) towers around.It seems that if it has 2 factories and 2 research labs, then if HQ is destroyed it won't build another one.
Yeah, it should, will do.it should use oiler trucks to build a new factory to try and revive itself.
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+
@Cyp - that's great news about DORDER_RECOVER in beta 5!! Can't wait! 
I assume that AI scripts will need to issue that command to pick stuff up, and that stuff won't be picked up by AI droids simply by moving in to the tile while carrying out some other command? (Otherwise, after attacking an enemy AI base the human player won't get chance to pick up artefacts because AI droids going about their usual business will have picked them up).
I assume that AI scripts will need to issue that command to pick stuff up, and that stuff won't be picked up by AI droids simply by moving in to the tile while carrying out some other command? (Otherwise, after attacking an enemy AI base the human player won't get chance to pick up artefacts because AI droids going about their usual business will have picked them up).
"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
-
aubergine
- Professional

- Posts: 3462
- Joined: 10 Oct 2010, 00:58
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
@NoQ how are you detecting when a map has lots of sea, and how do you detect which units are hovercraft?
"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
-
zany
- Trained

- Posts: 303
- Joined: 20 Sep 2011, 07:04
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
what did you do to the gfx? that looks nothing like what it should?aubergine wrote:Are there details of what player IDs scavs use based on map player count anywhere?
Also, Nullbot seems to have an aversion to rebuilding HQ in certain circumstances:
It seems that if it has 2 factories and 2 research labs, then if HQ is destroyed it won't build another one.
-
aubergine
- Professional

- Posts: 3462
- Joined: 10 Oct 2010, 00:58
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
I'm on an Apple Macbook heh. What should it look like?
"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
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
1. By calling droidCanReach for initial trucks to enemy start locations at start of the game.aubergine wrote:@NoQ how are you detecting when a map has lots of sea, and how do you detect which units are hovercraft?
2. By calling droidCanReach for newly-built droids to enemy start locations.
This method is pretty bad, because humans are capable of relocating their bases to the island, which will not be detected, but i have no idea how to fix that, and anyway, it's better than nothing.
+1.aubergine wrote:What should it look like?
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+
An alternative might be to enumDroid() for each enemy and see if the droid .name includes the word "Hover" - if lots of their droids are hover, there is likely lots of water on the map.
I really wish there was a proper way for an AI to get real map information - eg. for each tile what is its terrain, elevation, lighting, and continent.
BTW, I've been doing some more digging in to the QtScript environment and it looks like it's not caught up with some of the more recent ECMA-262 additions such as deconstructors and iterators/generators which is making my progress on a long running iterator (discussed earlier in this topic somewhere) rather tedious
I really wish there was a proper way for an AI to get real map information - eg. for each tile what is its terrain, elevation, lighting, and continent.
BTW, I've been doing some more digging in to the QtScript environment and it looks like it's not caught up with some of the more recent ECMA-262 additions such as deconstructors and iterators/generators which is making my progress on a long running iterator (discussed earlier in this topic somewhere) rather tedious
"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
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
Emm not really.An alternative might be to enumDroid() for each enemy and see if the droid .name includes the word "Hover" - if lots of their droids are hover, there is likely lots of water on the map.
1. There are many pure-hover strategies on completely ground maps. For example, flamers make sense only hovers.
2. NullBot doesn't include the word "Hover" into the unit name even if it's hover. So in hover FFAs this method won't work.
The better way could be to check droidCanReach to all enemy factories
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+
Well, this will get you a list of all land droid factories in the game (I assume you'd want to check allies too):
Then just iterate through factoryList (array of structure objects) doing a droidCanReach on each of them.
Code: Select all
function enumFactories() {
var factories = ["A0LightFactory","A0CyborgFactory"];
var factoryList = [];
var player = maxPlayers;
while (-1<--player) {
if (player == me) continue; // assume we can reach our own factories (:
factories.forEach(function(factory) {
factoryList = factoryList.concat(enumStruct(player,factory));
});
}
return factoryList;
}
"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
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
No no no, the main problem is how to pick the droid necessary for the call.
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+
Hrm, yes, considering that eventually all your trucks will be hovers...
Maybe you could do something on eventDroidBuilt() -- if you know the built droid isn't a hover/vtol then use that, and have a de-spam so it only does the enumFactories thing no more than once per 3 minutes?
Maybe you could do something on eventDroidBuilt() -- if you know the built droid isn't a hover/vtol then use that, and have a de-spam so it only does the enumFactories thing no more than once per 3 minutes?
"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
-
effigy
- Regular

- Posts: 1217
- Joined: 22 Jan 2010, 03:21
Re: NullBot: an adaptive skirmish AI for Warzone 2100 v3.1+
I just had a nice 30 min skirmish vs. MC'bot 1.03... I was wondering does he also do nice MG research? I was surprised that once I got to his base he put up a lot of HMG Hardpoints (this screenshot is missing a few, KIA):
You do not have the required permissions to view the files attached to this post.
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
