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

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

Postby JimmyJack » 05 Nov 2017, 05:21

I just downloaded 2.1 and can not play it. It makes the game (3.2.3) lag and the longer the game runs the more the lag until it locks up all together. Maybe I should not play with 7 bots but it lags in 2 player also.

Tried it with 3.1.1 and got the same.
Bring back the cool! The Rman-Jack VTOL builder.
Transmission ends ...
User avatar
JimmyJack
Trained
Trained
 
Posts: 71
Joined: 06 May 2017, 05:50

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

Postby Berserk Cyborg » 05 Nov 2017, 06:57

If it helps, I did a 4v4 AI test (all normal difficulty) on the map mero_WarPaths and attached the logs. Some of your averages get really high (~50000 in some cases) while the worst column can be almost 1/4 of a second. eventResearched, eventDroidIdle, and eventStructureBuilt are the ones I remember being bad with performance. Not that my bot has amazing performance, but I think a goal of 5ms should be the max of any one function.

perf.zip
(6.73 KiB) Downloaded 36 times
User avatar
Berserk Cyborg
Code contributor
Code contributor
 
Posts: 573
Joined: 26 Sep 2016, 19:56

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

Postby Prot » 05 Nov 2017, 20:30

JimmyJack wrote:I just downloaded 2.1 and can not play it. It makes the game (3.2.3) lag and the longer the game runs the more the lag until it locks up all together. Maybe I should not play with 7 bots but it lags in 2 player also.

Tried it with 3.1.1 and got the same.

Can you say, how much RAM you have, what a CPU, and OS?
User avatar
Prot
Trained
Trained
 
Posts: 156
Joined: 29 Nov 2010, 12:41

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

Postby JimmyJack » 06 Nov 2017, 08:05

Tech Support Guy System Info Utility version 1.0.0.4

OS Version: Microsoft Windows 10 Home, 64 bit
Processor: Intel(R) Pentium(R) CPU N3540 @ 2.16GHz, Intel64 Family 6 Model 55 Stepping 8
Processor Count: 4
RAM: 3985 Mb
Graphics Card: Intel(R) HD Graphics, -2039 Mb
Hard Drives: C: 446 GB (398 GB Free); D: 18 GB (1 GB Free);
Motherboard: Hewlett-Packard, 233F
Antivirus: Windows Defender
Bring back the cool! The Rman-Jack VTOL builder.
Transmission ends ...
User avatar
JimmyJack
Trained
Trained
 
Posts: 71
Joined: 06 May 2017, 05:50

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

Postby NoQ » 30 Dec 2017, 20:19

Btw you can code it so that your console prints are only enabled in cheat mode. `eventCheatMode()` helps figuring out if it is on. If you want to print stuff at start of the game, you can delay them by like 10 seconds by changing `debug(string_to_print)` to eg. `queue("debug", 10000, string_to_print)` (hope it works) so that you had time to press shift+backspace. This way you can still read them but regular users aren't distracted.
User avatar
NoQ
Special
Special
 
Posts: 6146
Joined: 24 Dec 2009, 11:35
Location: /var/zone

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

Postby Prot » 31 Dec 2017, 08:07

NoQ wrote:`eventCheatMode()` helps figuring out if it is on.

Thanks, it's good way to enable debug when it needs during the game
User avatar
Prot
Trained
Trained
 
Posts: 156
Joined: 29 Nov 2010, 12:41

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

Postby Prot » 15 Jan 2018, 16:07

User avatar
Prot
Trained
Trained
 
Posts: 156
Joined: 29 Nov 2010, 12:41

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

Postby andrvaut » 15 Jan 2018, 17:59


please, use english version the info overlay.
vaut ΣΑ [GN], ru streamer.
Tournaments channel: https://www.youtube.com/channel/UCzusNa-54ydodtSz2TdHFww
User avatar
andrvaut
Trained
Trained
 
Posts: 82
Joined: 02 Jan 2016, 12:44

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

Postby Prot » 07 Feb 2018, 08:23

Release v2.2: Better, faster, smarter

bonecrusher_v2.2.wz
(64.88 KiB) Downloaded 55 times


Changes:
For both game v3.1.5 and v3.2.3:
  • new: Now can play on islands maps
  • fix: Did not capture the oil on the maps, where the allies begin to come close to each other
  • fix: Now the Builder determines if the oil rig or barrel is built inside the trees or rubbish, and does not stand near it forever
  • fix: Secondary search construction group in idle state not idling, and helps the main builders inside the base
  • fix: Fixed a rare errors in events.js, while try to move a group of "hunters" from empty group "buildersMain"
  • fix: Fixed a rare errors in builders.js, while try to sort unused oil, if fully captured maps.
  • tweak: If it plays with a small amount of energy, then do not waste energy and do not build the latest module at the factory
  • tweak: If it plays with a small amount of energy, do not waste the remaining energy on all available laboratories
  • tweak: Do not produce anymore heavy flamethrower, it is too slow
  • tweak: Main army while collecting half of the troops begins to act
  • tweak: Finishing the remaining enemy builders at the end of match
  • tweak: After a partially destroyed base, now restores the base on the basis of available resources and the situation
  • changes: Rewritten the main function that killed performance, filling the cache variable (optimization)
On difficulty HARD and INSANE:
  • HARD+ tweak: Do not use weak research paths
  • HARD+ tweak: Do not use slow buildorders
  • HARD+ tweak: Additional logic and a microcontrols for the army and builders (there may be some loss of performance)
  • HARD+ tweak: Builders build more defensive towers, strengthening strategic points
On ISLAND type maps:
  • new: The army is made up of hovers
  • new: Does not build many wheel builders
  • new: Does not build a lot of laboratories, if under the control of little oil
  • new: A different logic of redistribution of groups of builders
  • new: Remove all research from path related to cyborgs
Only for game v3.2.3:
  • 3.2+ new: Replacement builders on hovers, selling old
  • 3.2+ new: Now he can share units with a partner on the team
  • 3.2+ new: Collects the barrels by the builders, if they are visible
Features only for NTW type HighOil maps:
  • new: New buildorder for NTW-style maps
  • new: Secondary army group has different attack and intelligence logic
  • new: Builders build defensive towers in places of skirmishes of armies
  • 3.2+ HARD+ new: New experimental control function of the main army (stacks, retreats, waitings, better performance)

Highly recommend to try out the last point. To duel on NTW-like maps with game v3.2.3 on difficulty level HARD or INSANE.
In the AI championship (WZ AI T) it is already distinguished by the ratio of victories and defeats among other bots.
wzait.png
wzait.png (70.23 KiB) Viewed 1381 times


Much of the planned in this release, I did not have time to finish for my vacation. I'll put it on hold for the next release.
This is one of the penultimate versions with support for 3.1.5, in the future I plan to give up support for 3.1.5 and focus on performance.
User avatar
Prot
Trained
Trained
 
Posts: 156
Joined: 29 Nov 2010, 12:41

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

Postby MIH-XTC » 07 Feb 2018, 16:28

How were you able to simulate so many games played? You have simulated over 50,000 games??

Eventually I want to make a neural net for Nexus in Python but one problem is that it will require simulation of several thousand games. Right now I do manual simulations with autogame on but it's way too slow to collect enough game data to train a neural net because each game I have to go through the menus to relaunch it. I need to figure out if I can automate several game simulations with no human interaction so that I can collect data while I'm away.
MIH-XTC
Trained
Trained
 
Posts: 251
Joined: 31 Jan 2014, 07:06

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

Postby Prot » 07 Feb 2018, 18:16

MIH-XTC wrote:How were you able to simulate so many games played? You have simulated over 50,000 games??

Eventually I want to make a neural net for Nexus in Python but one problem is that it will require simulation of several thousand games. Right now I do manual simulations with autogame on but it's way too slow to collect enough game data to train a neural net because each game I have to go through the menus to relaunch it. I need to figure out if I can automate several game simulations with no human interaction so that I can collect data while I'm away.

The match goes from 30 seconds to two minutes, averaging a minute. The game match is from 15 minutes to 2 hours, when the bots got stupid. It turns out 50,000 games somewhere for a month. I have already longer spin scripts and autogame running on server 24/7.
User avatar
Prot
Trained
Trained
 
Posts: 156
Joined: 29 Nov 2010, 12:41

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

Postby Forgon » 07 Feb 2018, 18:34

Prot wrote: [...] The match goes from 30 seconds to two minutes, averaging a minute. The game match is from 15 minutes to 2 hours, when the bots got stupid. It turns out 50,000 games somewhere for a month. I have already longer spin scripts and autogame running on server 24/7.

It would be nice if you published your scripts, so that other people could use them as well.
Besides, will your website soon be online again?
Review my new green assignment crosshair cursor: ticket #4778
Forgon
Code contributor
Code contributor
 
Posts: 123
Joined: 07 Dec 2016, 22:23

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

Postby Prot » 08 Feb 2018, 13:20

Forgon wrote:It would be nice if you published your scripts, so that other people could use them as well.
Besides, will your website soon be online again?


Some scripts are outright bad code, and I am ashamed to show them. I've been asked to show code parsing maps in layers, still can not reach the hands to put in order code. As soon as I put in order immediately publish on github

By the way, my site is already online, there were problems with the Registrar.
User avatar
Prot
Trained
Trained
 
Posts: 156
Joined: 29 Nov 2010, 12:41

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

Postby Cyp » 08 Feb 2018, 17:12

On an unrelated note, does anyone happen to know anything about that weird wz2100_bot that seems to keep joining every hosted game?
Cyp
Evitcani
Evitcani
 
Posts: 702
Joined: 17 Jan 2010, 23:35

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

Postby Prot » 08 Feb 2018, 17:50

Cyp wrote:On an unrelated note, does anyone happen to know anything about that weird wz2100_bot that seems to keep joining every hosted game?

Yep, this is mine, i recreated the network Protocol in php, the bot connects to the created game on the side of the player, and collects detailed information on the settings of the created game. Like start with base, alliances, energy, scavs, players and their rangs.
http://wz2100.euphobos.ru/
Because the master server Protocol is too simple and does not contain the necessary information about created games.
I just don't see another way how I can still conveniently provide information to those who are interested, but who are too lazy to run the game client.
User avatar
Prot
Trained
Trained
 
Posts: 156
Joined: 29 Nov 2010, 12:41

PreviousNext

Return to Addon discussions