[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!

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

Postby Prot » 26 Mar 2017, 12:09

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 75 times
User avatar
Prot
Trained
Trained
 
Posts: 58
Joined: 29 Nov 2010, 12:41

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

Postby MIH-XTC » 28 Mar 2017, 01:00

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.
MIH-XTC
Trained
Trained
 
Posts: 165
Joined: 31 Jan 2014, 07:06

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

Postby Berserk Cyborg » 28 Mar 2017, 04:34

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.
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 270
Joined: 26 Sep 2016, 19:56

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

Postby Prot » 28 Mar 2017, 12:22

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

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

Postby NoQ » 28 Mar 2017, 13:19

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
NoQ
Special
Special
 
Posts: 6067
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Postby Prot » 28 Mar 2017, 13:57

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.
User avatar
Prot
Trained
Trained
 
Posts: 58
Joined: 29 Nov 2010, 12:41

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

Postby MIH-XTC » 28 Mar 2017, 22:56

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.
MIH-XTC
Trained
Trained
 
Posts: 165
Joined: 31 Jan 2014, 07:06

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

Postby Prot » 29 Mar 2017, 18:07

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

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

Postby MIH-XTC » 29 Mar 2017, 19:22

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.
MIH-XTC
Trained
Trained
 
Posts: 165
Joined: 31 Jan 2014, 07:06

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

Postby Berserk Cyborg » 29 Mar 2017, 20:28

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).
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 270
Joined: 26 Sep 2016, 19:56

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

Postby Prot » 29 Mar 2017, 22:53

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

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

Postby Tenoh » 04 Apr 2017, 09:29

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
Tenoh
Trained
Trained
 
Posts: 352
Joined: 18 Nov 2008, 15:06

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

Postby Prot » 11 Aug 2017, 19:13

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

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

Postby Twister22 » 30 Aug 2017, 21:24

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
Twister22
Trained
Trained
 
Posts: 140
Joined: 28 Aug 2017, 22:18
Location: United States, Alabama


Return to Addon discussions