[AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

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
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

[AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Prot »

I present to you a new non-cheat bot that I wrote from scratch.
Decided to create a new topic, because in fact it's a very different AI, but I decided not to change the bot name, and now it's for 3.2+ too.

What can AI do:
1. Kill you
2. You still alive? Then kill you!
3. ...
joke :lol2:
Just try it yourself :wink:

The weakness of the bot:
Spoiler:
By the way: The bot can be no bad company in the game with a partner. He has teamplay algorithms :wink:
It use only 2 mode of difficulty EASY and other. On EASY mode, there are some limit's and slowness.
If you set Hard from Normal - there will be no difference.

On the technical side, the bot is entirely created under version 3.1.5, but in version 3.2, he also knows how to play not bad. Despite the fact that does not use the advanced functions of the game 3.2, such as chat, beacons, etc.
On the ver 3.1.5 was played a lot of test matches. However, version 3.2 of the matches were only a few, but the error was not noticed.
Please leave comments, especially if there are any errors :wink:

Known error:
Spoiler:
License CC-0
Attachments
bonecrusher2.wz
BoneCrusher! 2 bot player
(35.96 KiB) Downloaded 662 times
MIH-XTC
Trained
Trained
Posts: 368
Joined: 31 Jan 2014, 07:06

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by MIH-XTC »

Hey I tested your AI. It's pretty good, I was very surprised that it beat mine on Arid map in T1 no base. Arid is a 3v3 low oil map with ~8 derricks per player. Your bot won by building a couple of fortifications around the oil resources before building derricks and slowly pushed across the map conquering each derrick as such. That's good strategy and it knew which oils were outside the base. It helped expose a flaw in my bot such that I need to have buildDerrick check for danger in the vicinity because my trucks kept suiciding towards guarded resources. This is good to train with another bot :) Your bot also made good research choices too, 2 were researching cannon + mg with armor and research upgrades while the 3rd was specializing in fortification research.

I played a 5v5 40 oil NTW game and your bot did a truck rush so that was cool and something new to see. The research here was decent but can be improved. They also used a cannon + mg profile in this game but they missed HPV cannon, medium cannon, scorpion and python so they only focus on the upgrades and overlook some of the turrets and bodies. One of them was researching rocket autoloader so I think maybe going for ripple but kind of random to have. Your bots were only using 1 - 3 research centers out of 4 so they do not research anything extra outside of what you specified in the cannon + mg research path.

I work on Nexus AI and created 4 research profiles. Here are the research priority arrays I created if it helps you setup your research profiles faster.
Spoiler:
The base building was fairly good too. I think your bot was using 2 groups of 2 trucks which is okay in a small oil game but it wasn't sufficient for a NTW game. The structure upgrades were applied in a timely fashion.

Now for the bad. It's unplayable on maps with 6 or more players because it constantly locks up and freezes every other second. It starts out fine but after 1 - 3 minutes it starts to lock up every other second such that it's not playable anymore. With shared research it seemed like it was a little bit better but still very laggy. Whatever it is you're calling so frequent I think it's getting called synchronously with each instance of the bot and it seems not as bad with shared research. It's super noticeable on 100x speed, it made testing this much longer and not able to test much else because it takes too long. On 5v5 40 oil the game essentially came to a complete stop around the 15 minute mark the locking up was so bad. I performed this testing on a clean version of 3.2.2.

I've been putting in about 10 hours a week working on Nexus. I stuck with WZscript because I didn't understand how the triggers work in Javascript. I looked at Nullbot but _main.js is seemingly empty and there's nothing in _events.js so I don't understand how that works. By looking at your bot I see how it works now. There's actually stuff in main.js.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Berserk Cyborg »

The truck rushing abilities of your AI is really good (though I guess that depends on the map). Those early VTOL units being produced was a bit surprising at first (~20 minutes into the Rolling Hills map with T1 no bases). Though I did encounter bad lag at times. Other than that, your AI does great.

Found a bug: Did not find timer nastyFeaturesCl... to remove.
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Prot »

MIH-XTC wrote:Some of these research items I created as part of stats balance I'm working on so they will not compile for you
Woa! Big thanks! I would definitely try it research path in my bot.
I already wrote a separate logic for games on the maps like NTW, above all else, there were several tasks I wanted to complete before publishing, but at the moment I have in the next few weeks will not have free time, so I cut out the unfinished logic NTW from the bot, and put the concept to the next release.
Besides, I don't like and I don't know how to play NTW, I need to read about a building queue and tactics, before teaching the bot :)
Yeah, i known the performance problems, believe me, before the release of one last commit, the performance was even worse :lol2: Yes, I need to modify, I'll keep working on it. Although I have not tried to run more than 3 my bots in a battle.
Berserk Cyborg wrote:Found a bug: Did not find timer nastyFeaturesCl... to remove.
Hmm.. What was the map and what version of WZ the error occurred?
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by NoQ »

Regarding performance and lockups - did you notice we have a builtin profiler? => viewtopic.php?f=35&t=10545 You can either run it yourself or have your users submit dumps to see what's slow.
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Prot »

NoQ wrote:Regarding performance and lockups - did you notice we have a builtin profiler? => viewtopic.php?f=35&t=10545 You can either run it yourself or have your users submit dumps to see what's slow.
Wow, no, i not known, i even planned to write to measure execution time of functions by the bot it'self.
Thanks, it's gonna help alot.
MIH-XTC
Trained
Trained
Posts: 368
Joined: 31 Jan 2014, 07:06

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by MIH-XTC »

NoQ wrote:Regarding performance and lockups - did you notice we have a builtin profiler? => viewtopic.php?f=35&t=10545 You can either run it yourself or have your users submit dumps to see what's slow.
Wow that's exactly what I need, one of the first questions I asked myself when I started working on AI is how costly is it to increase the frequency of trigger calls because I added some and reduced some by half but wasn't sure of the implications or a way to test that it's acceptable. Lol, I didn't think that capturing that level of granularity in the calls was feasible, this should also make debugging much faster. How do you use it though? I don't understand. I thought I recalled seeing a performance logs before but I don't have any in my log files.

On a side note, I just discovered the DORDER's last night which I know you guys are already familiar with but for me it's revolutionary because I've been trying to figure out how to make the VTOL's attack anything they see in route to their target and sometimes the ground droids do dumb suicide attacks. However when I changed the DORDER from attack to scout they sat idle and patrol and circle throw errors presumably because they're not added into scriptai.cpp. I'm going to try and get DORDER_CIRCLE working but just discovered this last night.
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Prot »

MIH-XTC, It seems in your technical ways used unknown technology. I put them in as is and got error about R-Struc-Research-Upgrade10, the last in the game is R-Struc-Research-Upgrade09. Well, threw it away and will play around further..

upd:
I just wrote a function that at the start of the game checks all of the passed research, you have many unknown research in those ways..

Code: Select all

bc[1]{Blue}(error): Unknown research "R-Struc-Research-Upgrade10" - ignored
bc[1]{Blue}(error): Unknown research "R-Struc-Power-Upgrade07" - ignored
bc[1]{Blue}(error): Unknown research "R-Wpn-Missile-Range03" - ignored
bc[1]{Blue}(error): Unknown research "R-Wpn-Rocket-Range03" - ignored
bc[1]{Blue}(error): Unknown research "R-Cyborg-Engine04" - ignored
bc[1]{Blue}(error): Unknown research "R-Wpn-MG-Range03" - ignored
bc[1]{Blue}(research): Checked research way length=25, returned=19

bc[1]{Blue}(error): Unknown research "R-Struc-Research-Upgrade10" - ignored
bc[1]{Blue}(error): Unknown research "R-Struc-Power-Upgrade07" - ignored
bc[1]{Blue}(error): Unknown research "R-Wpn-Bomb-Damage06" - ignored
bc[1]{Blue}(error): Unknown research "R-Vehicle-Engine10" - ignored
bc[1]{Blue}(error): Unknown research "R-Vehicle-Metals10" - ignored
bc[1]{Blue}(error): Unknown research "R-Cyborg-Engine05" - ignored
bc[1]{Blue}(research): Checked research way length=28, returned=22

bc[1]{Blue}(error): Unknown research "R-Struc-Research-Upgrade10" - ignored
bc[1]{Blue}(error): Unknown research "R-Struc-Power-Upgrade07" - ignored
bc[1]{Blue}(error): Unknown research "R-Wpn-Cannon-Range03" - ignored
bc[1]{Blue}(error): Unknown research "R-Cyborg-Engine04" - ignored
bc[1]{Blue}(error): Unknown research "R-Wpn-MG-Range02" - ignored
bc[1]{Blue}(research): Checked research way length=27, returned=22

bc[1]{Blue}(error): Unknown research "R-Struc-Research-Upgrade10" - ignored
bc[1]{Blue}(error): Unknown research "R-Struc-Power-Upgrade07" - ignored
bc[1]{Blue}(error): Unknown research "R-Wpn-Mortar-Range04" - ignored
bc[1]{Blue}(error): Unknown research "R-Cyborg-Hvywpn-Mortar" - ignored
bc[1]{Blue}(error): Unknown research "R-Cyborg-Engine04" - ignored
bc[1]{Blue}(error): Unknown research "R-Wpn-Howitzer-Range03" - ignored
bc[1]{Blue}(research): Checked research way length=24, returned=18
MIH-XTC
Trained
Trained
Posts: 368
Joined: 31 Jan 2014, 07:06

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by MIH-XTC »

Yea that's correct, those are new experimental upgrades I created for the stats that I'm working on so you can remove or change them to something else. For example, I created R-Struc-Research-Upgrade10 so you will have to change it to 09. I posted the arrays to give you an idea of what the research priorities might look like for a particular research route.

When I was testing the AI research choices I originally thought that putting emplacements instead of turrets would be better because the emplacement covers the turret as well. For example scourge hardpoint instead of scourge turret but then I found that caused AI to research wall in the beginning of tech tree when more important things were available even though I put scourge hardpoint as low priority. It can be tricky to get the desired research behavior. For example, I had problems when I added uplink to the end of the research array because it caused AI to keep researching wall upgrades during times when it was not important even though it's least priority (last in array).

Some other examples are incendiary weapons. If you put incendiary mortar in research array, it might cause AI to research flamer in beginning of tech tree even though research/power upgrades might be available. If you put VTOL HEAP bomb then your AI might start researching mortar when it's not important because HE shell MK2 is needed. Another is example is ripple rocket requires CB turret which requires wall so if you put ripple rocket in research array your AI might start researching wall. These are the things that can be tricky when prioritizing a research array.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Berserk Cyborg »

Prot wrote:
Berserk Cyborg wrote:Found a bug: Did not find timer nastyFeaturesCl... to remove.
Hmm.. What was the map and what version of WZ the error occurred?
Git master. From my tests it happens on maps like Bloat and Rolling Hills and Melting (seems to occur with maps with features like trees and building and similar objects).
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Prot »

Berserk Cyborg wrote:
Prot wrote:
Berserk Cyborg wrote:Found a bug: Did not find timer nastyFeaturesCl... to remove.
Hmm.. What was the map and what version of WZ the error occurred?
Git master. From my tests it happens on maps like Bloat and Rolling Hills and Melting (seems to occur with maps with features like trees and building and similar objects).
Yeah, find it, fix it :)
User avatar
Tenoh
Trained
Trained
Posts: 359
Joined: 18 Nov 2008, 15:06

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Tenoh »

love it,very aggressive! one thing i dont like about it though, it leaves its own base defenseless.
"No, you don't want to buy this Sh[beep]t from me. It shoots sideways, it was built by retard zombies in some f[beep]king outreach program." HL:G
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Prot »

For a while I had to suspend the development of the bot, i been busy. Now share the latest developments of the bot. He's still in the development process, no matter what, I will release a new version, because I have a lot of plans and ideas about artificial intelligence.

1 vs 6
Team A:
BoneCrusher, (and me as spectator only)
VERSUS
Team B HARD:
nexus, semperfi, nullbot3.04, cobra, nullbot:turtle, semperfi-js
https://youtu.be/AIPP4XgZYZQ
User avatar
Twister22
Trained
Trained
Posts: 140
Joined: 28 Aug 2017, 22:18
Location: United States, Alabama

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Twister22 »

I'm willing to add this to the wz2120 mod
It sounds like an awesome AI :)
Great Work! :wink:
WZ2120&Nukemod Duo
http://forums.wz2100.net/viewtopic.php?f=49&t=13527
donate the project!
http://donations.wz2100.net/
User avatar
Prot
Trained
Trained
Posts: 242
Joined: 29 Nov 2010, 12:41

Re: [AI] "BoneCrusher! 2" bot player for 3.1.5 and 3.2+

Post by Prot »

Changelog BoneCrusher! v2.1
- A little optimization
- A few new ways to build bases and research (Now the bot will not be repeated, diversity)
- Can produce heavy cyborgs and new guns on droids
- Improved functionality of builders for different situations
- Now the bot determines the oil-rich(NTW-like) maps, and plays on them differently.
- Many minor improvements in logic in different functions
- All difficulty levels are now used
EASY - research random, very slow reaction and -20% oil extraction by the WZ-engine
NORMAL - optimized function, I think he should not now very lag on a weak CPU, based on funtion eventDroidIdle(), but since this function in this version 3.2.3 doesn't work correctly, the bot can duty rebate and stand still as the army and builders.
HARD - Still non-cheat but heavy, and so the same for the CPU, the best reaction is, the less the randomness in the construction of its base, it is better not to use more than two bots on hard difficulty on the same map.
INSANE - Even faster response, even harder for the CPU, besides UPS from the engine like +50% oil extraction, and prebuild oil extractors and defences(This CHEATs forced on the game engine itself).
For 3.1.5 only:
- Disabled the detection and destruction of garbage next to the oil spot(Due to the heavy execution on CPU and bugs).
For 3.2+ only:
- Now bot can use jammers
- Units armed with flamethrower not trying to depart for the army.
- Early preparation for a chat with the bot (You can ask the ally bonecrusher to give you resources or builders just say to all in chat "bc gmn" - for oil-money, or "bc gtn" for construction trucks)
Attachments
bonecrusher2.1.wz
(55.79 KiB) Downloaded 431 times
Post Reply