dumb.js: a simple PSO based AI that stronger than bonecrusher
dumb.js: a simple PSO based AI that stronger than bonecrusher
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.
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 72 times
Re: dumb.js: a simple PSO based AI that stronger than bonecrusher
license:CC0
screenshot (AI attached player vs insane bonecrusher):
screenshot (AI attached player vs insane bonecrusher):
Re: dumb.js: a simple PSO based AI that stronger than bonecrusher
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.
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 64 times
Re: dumb.js: a simple PSO based AI that stronger than bonecrusher
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.
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 41 times
Re: dumb.js: a simple PSO based AI that stronger than bonecrusher
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. to avoid overwrite, make sure older version of dumb.zip have been removed
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. to avoid overwrite, make sure older version of dumb.zip have been removed
- Attachments
-
- dumb12.zip
- (6.59 KiB) Downloaded 21 times
-
- dumb-flamer.zip
- (2.5 KiB) Downloaded 18 times
Re: dumb.js: a simple PSO based AI that stronger than bonecrusher
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 20 times
-
- dumb10b.zip
- v1
- (6.04 KiB) Downloaded 12 times
Last edited by wanjia1 on 17 Mar 2024, 14:12, edited 5 times in total.
Re: dumb.js: a simple PSO based AI that stronger than bonecrusher
dumb10b rushed by dumb12a
Re: dumb.js: a simple PSO based AI that stronger than bonecrusher
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(?)
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 13 times
-
- dumb11.zip
- (11.81 KiB) Downloaded 15 times
Re: dumb.js: a simple PSO based AI that stronger than bonecrusher
dumb20: dumb with memory
(removed recycle, AA and VTOL support, too complex and rarely used)
only works in T1, 1v1, >24 oils
It use schmitt trigger to control defence or attack.
Input variable:
Name Range Description
enemyDistance (24, 36) to repair centre
limitRatio (.5, . countDroid(DROID_ANY,me)/getDroidLimit(me)
repairRatio (.1, .5) ratio of droids that health<40
When enemyDistance<24 || (limitRatio>.8 && repairRatio<.1), it will attack enemy with most droids.
Better droid control:
health>80: rush into enemy
health<80 && health>40: hit and run
health<40: return to repair
It can rush all insane built-in AI in 12 minutes with K/D>8:
Time K/D
SemperFi 11 minutes 313/35
Cobra 10 minutes 357/26
Bonecrusher 8 minutes 212/13
Nullbot 7 minutes 133/0
It can beat previous dumb-bot(about 80% chance), usually with needle gun:
Time(average) Win
dumb5 32 minutes 6/7
dumb10 30 minutes 12/15
dumb12a 31 minutes 8/11
It weak against flamers:
Time(average) Win
dumb10-flamer 8 minutes 1/5
Against other bots:
Time K/D
Ratbot(Insane) 10 minutes 266/39
(removed recycle, AA and VTOL support, too complex and rarely used)
only works in T1, 1v1, >24 oils
It use schmitt trigger to control defence or attack.
Input variable:
Name Range Description
enemyDistance (24, 36) to repair centre
limitRatio (.5, . countDroid(DROID_ANY,me)/getDroidLimit(me)
repairRatio (.1, .5) ratio of droids that health<40
When enemyDistance<24 || (limitRatio>.8 && repairRatio<.1), it will attack enemy with most droids.
Better droid control:
health>80: rush into enemy
health<80 && health>40: hit and run
health<40: return to repair
It can rush all insane built-in AI in 12 minutes with K/D>8:
Time K/D
SemperFi 11 minutes 313/35
Cobra 10 minutes 357/26
Bonecrusher 8 minutes 212/13
Nullbot 7 minutes 133/0
It can beat previous dumb-bot(about 80% chance), usually with needle gun:
Time(average) Win
dumb5 32 minutes 6/7
dumb10 30 minutes 12/15
dumb12a 31 minutes 8/11
It weak against flamers:
Time(average) Win
dumb10-flamer 8 minutes 1/5
Against other bots:
Time K/D
Ratbot(Insane) 10 minutes 266/39
- Attachments
-
- dumb20.zip
- (9.36 KiB) Downloaded 9 times