Page 2 of 3
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 19 Feb 2013, 13:10
by aubergine
How are you detecting hover-only maps on 3.1?
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 19 Feb 2013, 17:09
by Shadow Wolf TJC
Same way NullBot detects whether or not an enemy factory or truck is located in a normally unreachable location, by using the droidCanReach() function.
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 19 Feb 2013, 17:28
by aubergine
Ah, ok. I've been trying to use droidCanReach() to create a backport of propulsionCanReach() but ran in to all sorts of problems. Specifically, on WZ 3.1 some maps start with hover droids so gave false positives when trying to work out if something's land reachable. And to work out properly if something is reachable by hover and not land, I had to wait until first known hover units were built. Prior to that point, I can't say for sure whether hover will reach the target location -- eg. on VTOL only map, or the target is surrounded by impassible cliffs.
So, if using droidCanReach() approach, if a truck can't reach it then prolly best to assume that you need either hover or VTOL (not just hover), and check again once first hover is built to see if you need to then rush to VTOL as well. Also, bearing in mind that map-placed trucks in some maps are using hover propulsion and not wheels.
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 16 Mar 2013, 10:44
by aubergine
Using the rocket AI, it seems to build waaayy too many sensor droids in late game - and as they tend to hold back out of harms reach, they accumulate until a large portion of it's army is sensor droids.
At one point I counted about 40 sensor droids of various types.
Also, is that a radar detector?

- Region capture 1.png (128.45 KiB) Viewed 6311 times
The model/texture looks nicer than what's in the standard game. But why have so many radar detector droids when a single tower will usually do the trick?
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 17 Mar 2013, 01:01
by Shadow Wolf TJC
aubergine wrote:Using the rocket AI, it seems to build waaayy too many sensor droids in late game - and as they tend to hold back out of harms reach, they accumulate until a large portion of it's army is sensor droids.
Region capture 2.png
At one point I counted about 40 sensor droids of various types.
Did all 40 of those sensor droids belong to a single player? I tried to limit NullBotSW to fielding no more than 2 each of sensor, CB and radar detector tanks each, so theoretically, the max number of sensor, CB, and radar detector tanks combined that 9 NullBotSWs would have on the field should be no more than 54.
However, it's possible that NullBotSW may sometimes queue up more sensor tanks than is necessary. We'll need to find a way to tell what NullBotSW's factories are currently producing if we're to fix this problem.
Also, is that a radar detector?
Region capture 1.png
The model/texture looks nicer than what's in the standard game. But why have so many radar detector droids when a single tower will usually do the trick?
Radar Detectors have always had this kind of shape in vanilla Warzone 2100, but the ones that NullBotSW prefers to build are the new heavier versions of Radar Detectors, which are supposed to have greater range than (and appear as bigger versions of) standard Radar Detectors.
Sensor tanks, unlike sensor towers, are capable of moving from place to place, so imo, they're usually the better choice for assaulting locations, that may be guarded by enemy sensor towers, than tower-creeping, which I find too slow and inefficient (especially since, in Contingency, droid-mounted sensor turrets have the same range as sensor towers).
Recently, however, I discovered that radar detectors don't seem to work as I expected them to. Instead of revealing enemy sensors (allowing for artillery to fire on them) whose coverage overlaps with the radar detector's (that is, whether or not the distance between the radar detector and the enemy sensor is less than the sum of both of their sensor ranges), or even when the radar detector is within range of the enemy sensor, the radar detector only seems to spot targets that are within the radar detector's range. Moreover, they, alongside CB turrets, seem capable of spotting more than just artillery and sensors respectively, as I've seen them designate other kinds of enemy units and structures for artillery bombardment. What's the point of sensors and radar detectors then?
Edit: Apparently,
ticket #3672 seems to describe the same issue that I've just experienced.
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 17 Mar 2013, 02:28
by aubergine
Yes, all the sensors were same player. It was 1v1 match, me vs. NullBotSW rox. They were mostly radar detectors (about 20) and WS sensors (about 10-15), with a few CBs (about 5-10).
In WZ 3.2 you can use
getDroidProduction(factory) to work out what factory is making. In WZ 3.1 you'd need to create an object to store data about what each factory is making and then clear down in eventDroidBuilt().
The Radar Detectors certainly look a lot nicer in Contingency (I usually only build the bigger ones) - certainly a lot cleaner looking than the small ones in vanilla WZ. Maybe it's just due to the model being bigger, but they look much nicer.
I agree that sensor tanks are good - for normal/WS/CBs. When backed up by lots of long-range indirect/homing weapons, they are great way to take out enemy defences. The WS sensors in Contingency are particularly useful and I often use them to target enemy bases when wiping them out near the end of the game.
But not sure what benefit of radar detectors are on tanks - usually building a radar detector tower will highlight enemy radars across the most if not all of the map (depending on how big map is) as they have very long range (in vanilla WZ, not sure what the range is in Contingency?). I usually try and build just one such tower as close to centre of map as I can.
The radar detectors will make
enumBlips() return POSITION objects to let you know where enemy sensors, etc., are. I believe in 3.2 they'll be more useful as they'll prolly highlight where jammer turrets are. But you then need to scout the position to get the structure / droid that enumBlips() has detected. In WZ 3.2 you can use
enumRange()/
enumArea() to do that, or even better there's also the new
getObject() which can take a tile coordinate (x,y) and return the structure (not droid though) at the location. Maybe in 3.1 just send some VTOLs to circle the area and they'll blast away at anything that looks interesting.
Like you say, they shouldn't work like normal/WS/CB sensors, although each tank has it's own inbuilt sensor ability that would do that at close range. In 3.2 the WS sensor no longer has CB ability so keep an eye out for that. Will be interesting to see what happens with sensors in 3.2 - in particular the VTOL strike/CB sensors seem pretty useless in 3.1. Maybe if radar detector could be used to target enemy sensors/jammers (but not CB?) and also double up as VTOL targeting they would be more useful? If 3.2 or some later version adds
CRAM weapons get added at some point, VTOLs would be useful for taking those out. It would also be great if, should CRAM get added, there were also
ARM weapons specifically designed to take out enemy radars.
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 06 Apr 2013, 04:55
by AlphaThor01
ShadowWolf, this AI is beast! I was wondering this question: what does the SW stand for?
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 06 Apr 2013, 05:04
by NoQ
ShadowWolf, this AI is beast!
what does the SW stand for?
You just answered your question (:
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 06 Apr 2013, 05:46
by aubergine
Seems to be an issue with trucks starting to build something, then before finishing it they leave and start building something else...
That truck built all those foundations, after a few seconds on each it would go and start another foundation. Seen it happen a few times but managed to get a screenie this time.
Note: Truck wasn't attacked by anything and it was the same truck that made all of those.
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 06 Apr 2013, 06:32
by NoQ
As far as i remember, in classic nullbot the only case it abandons a structure is when it has been attacked by vtols, to go build anti-air instantly (with certain probability; half trucks go, half trucks stay). But it should come back and finish stuff later.
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 07 Apr 2013, 01:42
by Shadow Wolf TJC
@aubergine: Sometimes, NullBotSW is given a new build order that's given a higher priority, such as building enough artillery structures to satisfy its minimum artillery needs. In such cases, if it can't find any free oilerGroup trucks that aren't currently busy with anything, then it'll order one of its oilerGroup trucks to stop what it's currently building (which could be a mere bunker or hardpoint) to go build the new structure. It should eventually get around to finishing up its partially-built structures.
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 07 Apr 2013, 14:43
by AlphaThor01
NoQ wrote:ShadowWolf, this AI is beast!
what does the SW stand for?
You just answered your question (:
@NoQ: Uh, what is this supposed to mean? Just curious, sorry if I sounded a bit harsh.
Edit: @NoQ: Just found out. Sorry.
@aubergine: Same thing happened to me when I played with this AI. If attacked by something, the ai's truck would either retreat and build anti-personel, anti-tank, or anti-aircraft defenses.
@ShadowWolfTJC: How do I get rid of the AI's that came with the game? Recently I have been having trouble selecting the AI.
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 07 Apr 2013, 15:47
by NoQ
How do I get rid of the AI's that came with the game?
You can try deleting the /multiplay/skirmish/*.ai files inside mp.wz, but i'm not sure the game will work after that (the game relies on the presense of Nexus to provide autogame, so the script is loaded anyway ... not sure what happens if it's not present; also it probably may break your multiplayer).
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 07 Apr 2013, 18:41
by aubergine
@SW: In the pic above, the truck was building an AA defence (went in to debug mode to check) and then stopped and started building another AA defence of the same type. So maybe it needs to check to see if it's already building the same type of thing as the high priority thing? Or check to see if there are any un-finished things the same as the high priority thing?
Re: NullBotSW: A heavily modified NullBot AI for Contingency
Posted: 07 Apr 2013, 22:18
by AlphaThor01
@NoQ: Yeah, I'm not gonna risk crashing the game. Might be the smarter choice.