[3.1+] NullBot: an adaptive skirmish AI
-
themac
- Trained

- Posts: 415
- Joined: 17 Jul 2009, 19:14
- Location: Germany
Re: [3.1+] NullBot: an adaptive skirmish AI
You are my hero today ^^
-
cue
- Trained

- Posts: 59
- Joined: 06 Nov 2011, 00:12
Re: [3.1+] NullBot: an adaptive skirmish AI
We are 3 humans vs 4 AIs in a very open oil rich map.
But the AI units keep getting stuck as can be seen on the screen shot.
They start out with heavy attacks but then they kinda stop because they are all stuck.
I have not seen any slowdowns even if there are that many units.
But the AI units keep getting stuck as can be seen on the screen shot.
They start out with heavy attacks but then they kinda stop because they are all stuck.
I have not seen any slowdowns even if there are that many units.
You do not have the required permissions to view the files attached to this post.
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: [3.1+] NullBot: an adaptive skirmish AI
I cannot fix stuck units, it needs to be fixed on the game side (unit movement/pathfinder micro-ai). I do have some limited workarounds, but themac will rape me for sure if i try to improve them further. Well, i could have a look again ...
Heh, with the amount of units in themac's savegame i have slowdowns even without any AIs at all (:I have not seen any slowdowns even if there are that many units.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
cue
- Trained

- Posts: 59
- Joined: 06 Nov 2011, 00:12
Re: [3.1+] NullBot: an adaptive skirmish AI
We will rape you if you dont!NoQ wrote:I cannot fix stuck units, it needs to be fixed on the game side (unit movement/pathfinder micro-ai). I do have some limited workarounds, but themac will rape me for sure if i try to improve them further. Well, i could have a look again ...Heh, with the amount of units in themac's savegame i have slowdowns even without any AIs at all (:I have not seen any slowdowns even if there are that many units.
Lets hope the developers find a way to fix this. Should I report this to someone?
Our hardware is good, i7, i5 and a good AMD. perhaps that is why we dont have slowdowns?
What does hardware does themac have?
-
themac
- Trained

- Posts: 415
- Joined: 17 Jul 2009, 19:14
- Location: Germany
Re: [3.1+] NullBot: an adaptive skirmish AI
My iMac is an Intel Core i7 CPU that works between 2.8 and 3.8 Ghz. When the choppy play begins, the overall fps shown by Warzone are still high (>100)!
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: [3.1+] NullBot: an adaptive skirmish AI
It was already reported a lot. It annoys human players as well: units just don't move out of the way when they meet other units.Should I report this to someone?
Frames are not drawn, and the game doesn't proceed at all when the AI is thinking.the overall fps shown by Warzone are still high
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
themac
- Trained

- Posts: 415
- Joined: 17 Jul 2009, 19:14
- Location: Germany
Re: [3.1+] NullBot: an adaptive skirmish AI
Ah, yes, I remember. ^^
Maybe calculating 30 forces on the whole map doesn´t hurt the game much, but the more of them are on the war zone, the more the delay increases.
To keep WZ running smooth it would probably be an idea not to calculate all forces in the game every time every moment, but a decent maximum of them each second. After an hour there may be 300 units lurking around, so calculate 30 (for example only) in a second and the next 30 in the next second and so on. It will of course take 10 seconds until all units have been calculated, but stuttering will probably be avoided.
Maybe calculating 30 forces on the whole map doesn´t hurt the game much, but the more of them are on the war zone, the more the delay increases.
To keep WZ running smooth it would probably be an idea not to calculate all forces in the game every time every moment, but a decent maximum of them each second. After an hour there may be 300 units lurking around, so calculate 30 (for example only) in a second and the next 30 in the next second and so on. It will of course take 10 seconds until all units have been calculated, but stuttering will probably be avoided.
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: [3.1+] NullBot: an adaptive skirmish AI
I'm already doing it in quite a few places. But in some places the whole picture needs to be seen anyway.not to calculate all forces in the game every time every moment, but a decent maximum of them each second
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
themac
- Trained

- Posts: 415
- Joined: 17 Jul 2009, 19:14
- Location: Germany
Re: [3.1+] NullBot: an adaptive skirmish AI
As far as I understood it is hard to make NullBot Multithreading? So maybe it would be possible to make two seperate NullBot files that can each use its own thread of the CPU. One works on the half map, and the other one on the other half. One of them (or a third one) can then take both results together. 
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: [3.1+] NullBot: an adaptive skirmish AI
It won't help cause every piece of lag is still produced by a single piece of AI, while others are not doing anything during this time. Also, i don't think multi-threading is possible at all in JavaScript.
I've got a rough idea on what to do though, so when i release the next version, i'll be looking forward to analyzing another savegame (:
I've got a rough idea on what to do though, so when i release the next version, i'll be looking forward to analyzing another savegame (:
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
Duha
- Trained

- Posts: 287
- Joined: 25 Mar 2012, 20:05
- Location: SPb, Russia
Re: [3.1+] NullBot: an adaptive skirmish AI
May be some of multithreading is inside queueNoQ wrote:It won't help cause every piece of lag is still produced by a single piece of AI, while others are not doing anything during this time. Also, i don't think multi-threading is possible at all in JavaScript.
All optimization should be done after bottle neck found.I've got a rough idea on what to do though, so when i release the next version, i'll be looking forward to analyzing another savegame (:
Just add log "time-name" of start and end to you event functs.
and see ho often they triggered and how long its work.
I can help with log parsing.
http://addons.wz2100.net/ developer
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: [3.1+] NullBot: an adaptive skirmish AI
We're already having function execution time checks on the c++ side, this info is available via --debug=script (only in master, but easy enough to patch 3.1 to do that as well). For instance, right now i see the newly added (a couple versions ago) harass code to cause half of the problems, and it seems to be relatively easy to improve.
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: [3.1+] NullBot: an adaptive skirmish AI
v1.37.
Changes:
Changes:
- Certain cpu usage optimizations in attack, harass, and repair code.
- Invisible internal tweaks required to support WZ Mini Mod AI.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
themac
- Trained

- Posts: 415
- Joined: 17 Jul 2009, 19:14
- Location: Germany
-
cue
- Trained

- Posts: 59
- Joined: 06 Nov 2011, 00:12
Re: [3.1+] NullBot: an adaptive skirmish AI
This forum needs a "like" button 
Thank you NoQ
Thank you NoQ