dumb.js: a simple PSO based AI that stronger than bonecrusher

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!
Post Reply
wanjia1
Rookie
Rookie
Posts: 27
Joined: 01 Nov 2023, 06:05

dumb.js: a simple PSO based AI that stronger than bonecrusher

Post by wanjia1 »

It a AI based on PSO algorithm,and it can defeat any insane AI in 15 minutes,only in NTW T1 Fullbase.
It can also defeat 3 insane nullbot or 5 insane nexus in NTW maps.
It only have 255 lines of code.

It have no explicit tactic code,but simply cluster droids when attacked.
It have no memory.everything has to be calculated every step.
Its droid templates is hard-coded, it use cannons exclusive, and don't build factories or AAs.
Attachments
dumb.zip
(18.62 KiB) Downloaded 62 times
wanjia1
Rookie
Rookie
Posts: 27
Joined: 01 Nov 2023, 06:05

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

Post by wanjia1 »

license:CC0
screenshot (AI attached player vs insane bonecrusher):
Attachments
Screenshot_2023-12-02_10-46-02.jpg
wanjia1
Rookie
Rookie
Posts: 27
Joined: 01 Nov 2023, 06:05

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

Post by wanjia1 »

bugfix:
now the AI can build defense structure,laser satellite and AAs.This make it competent for T4 games.
it can defeat any hard AI in 45 minutes,in any NTW Fullbase game.
Attachments
dumb.zip
(19.2 KiB) Downloaded 57 times
wanjia1
Rookie
Rookie
Posts: 27
Joined: 01 Nov 2023, 06:05

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

Post by wanjia1 »

bugfix:
now the AI can build VTOL and oil derricks. its performance in ntw Nobase | Lowbase 1v1 game is above hard bonecrusher and below hard cobra.
also,it will build modules for structures.
it still fails on low oil map (even weaker than nexus). because all truck will move to a structure that being built and unable to get oils.
there is 497 lines of code in total.
Attachments
dumb.zip
(5.91 KiB) Downloaded 38 times
wanjia1
Rookie
Rookie
Posts: 27
Joined: 01 Nov 2023, 06:05

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

Post by wanjia1 »

better verion, not completed:

dumb-flamer: a full flamer made from dumb. have 120 lines of code, used to test bots. only works in NTW 1v1, can beat Insane Cobra in T1.

dumb12: new version of dumb. Its ONLY WORKS IN RO-1v1(or SnowTiny) and MUST PLACED IN NORTH.
It can beat Insane RatBot 0.9, Cobra, Bonecrusher, and average human player, in 12 minutes in T1
- attack when have more than 75 units
- make AA defense when attacked by VTOL
- VTOLs will attack enemy

they were coded in rush and have many bug

version for Ng-RO1v1Spec, because Its waypoints is hard-coded, also must placed in north.
dumb12a.zip
(6.59 KiB) Downloaded 16 times
to avoid overwrite, make sure older version of dumb.zip have been removed
Attachments
dumb12.zip
(6.59 KiB) Downloaded 16 times
dumb-flamer.zip
(2.5 KiB) Downloaded 14 times
wanjia1
Rookie
Rookie
Posts: 27
Joined: 01 Nov 2023, 06:05

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

Post by wanjia1 »

dumb10b.zip: a plasma cannon variant made from dumb10. can beat all previous dumb bot (except dumb12a) and cobra.
Attachments
dumb10b.zip
v2, also uses EMP cannon and HPV cannon, uses light body and have higher flamer ratio
(6.19 KiB) Downloaded 16 times
dumb10b.zip
v1
(6.04 KiB) Downloaded 10 times
Last edited by wanjia1 on 17 Mar 2024, 14:12, edited 5 times in total.
wanjia1
Rookie
Rookie
Posts: 27
Joined: 01 Nov 2023, 06:05

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

Post by wanjia1 »

dumb10b rushed by dumb12a
Attachments
Screenshot_2024-03-17_19-36-09.jpg
wanjia1
Rookie
Rookie
Posts: 27
Joined: 01 Nov 2023, 06:05

Re: dumb.js: a simple PSO based AI that stronger than bonecrusher

Post by wanjia1 »

Units now move in patrol mode, compare to dumb10,
it slight stronger against AIs, but weaker against humans.
still weaker than dumb12a, because it still can't cover retreating units.

Add chat commands:
say "w" to show all droids
say "r" to show `safeDest`
say "r1" to research Plasma Cannon and EMP cannon
say "r2" to research VTOL

also, split code into 9 files, which make it easier to read(?)
Attachments
dumb-src.zip
source file
(72.44 KiB) Downloaded 10 times
dumb11.zip
(11.81 KiB) Downloaded 11 times
Post Reply