[3.2+] NullBot 3 ‘Reloaded’

Did you create a mod, map, music, or a tool? Present them here and earn feedback!
Note: addon requests do not belong here.
Note, everything uploaded to this forum, MUST have a license!
User avatar
Arreon
Trained
Trained
Posts: 324
Joined: 15 Feb 2009, 05:57
Contact:

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by Arreon »

NoQ wrote:Hmm, seriously? Are all snapshots broken currently? :shock: O_o :o
Cause i'm compiling the game from git directly, and never needed to check out snapshots.

P.S. Lol, just noticed that i've been packing calling the mod .zip since eternity, and it worked.
Re-named anyway.
Still broken. :stressed:
OS: Windows 7 Home Premium 64-bit
Processor: AMD Phenom II X6 1045T (6 CPUs), ~2.7GHz
Memory: 8192MB RAM
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by NoQ »

File renaming wasn't relevant to your issue; it worked anyway.
We actually need someone to make a snapshot for us :(

Can only share a little video featuring the new AI (on both sides) :oops:
Last edited by NoQ on 30 Jan 2013, 20:23, edited 1 time in total.
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by Prot »

NoQ wrote:github
Thanx! It was good game.. The bot is very different from the first version nullbot for 3.1 =)
He became stronger opponent.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by NoQ »

Aha, we've got a linux/source snapshot now, but not a windows one yet.

aubergine: what do you think, how difficult would it be to use your backport code to make this AI run on 3.1? Even if it won't do very well (i'm mostly afraid of performance issues, and, of course, we won't have much fancy adaptation). Maybe you'd like to just fork me and try this out? (: (: (:
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by aubergine »

I'd love to give that a try. Is there some way you can get a list of what 3.2-specific features NB3 is using?

The old backport code (backport.js) was broken, but I've got a replacement called Define API -- it requires a couple of extra libraries to be included and I still need to write unit tests for it. I can prolly get the unit tests done by end of this weekend if I limit the amount of tests I write for the dependency checker that's part of Util API. As for performance issues, I have a Cache API that might help solve those :) Things like enumRange and enumArea backports would still be somewhat laggy though, but I believe there's enough stuff to get this new NB working on 3.1 branch...
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by NoQ »

Is there some way you can get a list of what 3.2-specific features NB3 is using?
Well, the moment you try running it, you'll easily see what's missing (:

enumRange, droid/structure.weapons/propulsion/body/.armed/.range/canHitAir/canHitGround, orderDroid, the new componentAvailable, buildDroid droidType tweaks, propulsionCanReach, ... that's a lot, in many cases it'd require some thinking; probably the trickiest will be all the buildDroid stuff.

One more limitation is that i wouldn't like any game stats mentioned outside the ruleset or personality code. That is, it'd be better to not backport .canHitAir using a list of turrets that can hit air; but if all such code is inside in the backport module and not overcomplicated, then i'd have to live with it (:
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by aubergine »

Yeah, some of those things are going to be "interesting" to backport, particularly the droid properties in the scenario of enemy droids (I already have some part-baked code for generating most of the props for own-built droids). I'll see what I can do.

I assume if I "fork" the nb repo, I end up with my own copy of it under my github account and stuff I push to it won't harm the main nb repo?

BTW, if you could, can you find out what the value of the scriptName and mapName globals are? I've not got round to documenting those and have no idea what sort of stuff they contain (eg. are path/extension included?).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by NoQ »

I assume if I "fork" the nb repo, I end up with my own copy of it under my github account and stuff I push to it won't harm the main nb repo?
Yeah, right. But i can take some commits from your repo and apply to my repo, and vice versa.
BTW, if you could, can you find out what the value of the scriptName and mapName globals are?
scriptName is something like "nb_generic" (without even .js), you can see it when the AI introduces himself in the chat.
Will have a look at mapName now.
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by Duha »

aubergine wrote: I assume if I "fork" the nb repo, I end up with my own copy of it under my github account and stuff I push to it won't harm the main nb repo?
https://help.github.com/articles/fork-a-repo
http://addons.wz2100.net/ developer
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by NoQ »

mapName is something like "Sk-Startup" or "Riviera-T1", i think it is based on how it is called in addon.lev.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by aubergine »

Tks for infos.

fireLassat() is a scary function -- if there's 1000 enemy objects, you'll be doing 1000 enumRange()'s and then iterating through the objects in each of those enums! :shock: Maybe better to use a for loop and increment counter by 2 or more to skip at least half the objects (assuming that decent target areas have clusters of objects, you'll still find the clusters)...?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by NoQ »

Well it'd be a nice effect when the game hangs for a few seconds of silence, you have no idea what happens, and then bah, the mechanical voice says your most precious base will be burned in an instant ... :lol2:

That was quick and dirty, maybe i'll do it the old way.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by aubergine »

Another way to do it would be to split the map in to 20x20 sectors, enumRange() each sector to find sector with most enemy, then do a more granular search in that sector.

That's 169 enumRange's (or enumArea?) for the sectors (on a 256x256 map), then 25 enumRange's within the most densely populated sector.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by Per »

Hmm add a map reduce API? ;-)
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: [3.2+] NullBot 3 ‘Reloaded’ ~alpha~

Post by aubergine »

JS already has Array.reduce and NoQ is using it: https://github.com/aubergine10/nullbot/ ... sat.js.inc

What would be really useful is if the C++ code already does some cluster analysis, if that could be exposed to the JS API... There are several cases where AIs need to find clusters of own/ally/enemy stuff, and currently it's quite a lot of work to be doing in JS whereas I imagine C++ implementation would be much quicker.

Something like getClusters([player[, type[, lookingPlayer]]]) which returns an array of clusters of objects of 'type' (default structure and droid), owned by player (default 'me', but can be ALLIES, ENEMIES, ALL_PLAYERS or player id), and filtered to 'lookingPlayer' (default to don't filter by visibility).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Post Reply