;redcode
;name SuperChargedBomberV1
;author Skybuck Flying
;strategy SuperChargedBomber, unfortunately kills itself eventually.
;history Created 1 December 2007
; Code copied from my SuperWarriorV5
; Maybe further modifications can be made to prevent killing itself
; All the spawned threads and the super charge speed are interesing
; War History and Analyzation:
; Fought RecycledBits
; Step 1: RecycledBits won 90%, lost %10
; Step 2: Analyzing: Bomb instruction probably badly chosen. Core is cleared
with $0, $0, bomb instruction was #0, #0, maybe recycled bits detects this ?
; Step 3: Make the bomb more stealth: use dat $0, $0 instead.
; Step 4: Refight: more or less the same results. I feel better with using
this new bomb instruction though
; Conclusion: further improvements possible by removing spl 1 out of the
loop, and creating instances in special loop until max instances created.
WarriorLength equ WarriorEnd-WarriorStart
WarriorBombingLength equ (CORESIZE-(WarriorLength+WARRIORS))
WarriorBombingStartingLocation equ WarriorEnd
WarriorStart
BomberBegin
BomberLooping
spl 1 ; creates a supercharged bomber, when it bombs it goes lighting
fast, this works thanks to atomic operations below:
; unfortunately it doesn't check the counter on time thus eventually it
will overwrite itself... still interesting though..
mov BomberBomb, >BomberDualCounter
djn.a BomberLooping, BomberDualCounter
BomberReset
; when loop is done, and the core has been cleared, reset the bomber to
prepare for another core clear.
mov.a #WarriorBombingLength, BomberDualCounter
mov.ab #WarriorBombingStartingLocation, BomberDualCounter ; little bit
strange, copies 14, instead of 12, minor problem
BomberRepeatCoreClear
jmp BomberBegin
BomberData
BomberDualCounter dat #WarriorBombingLength,
#WarriorBombingStartingLocation ; dual-counter: A-field = bombing length,
B-field = bombing location.
; BomberBomb dat #0, #0 ; using #0 is very stupid versus Recycled Bits
lol... apperently it triggers the enemy warrior
; the core is apperently cleared with dat $0, $0 so use that
instead... for more STEALTH !
BomberBomb dat $0, $0
BomberEnd
WarriorEnd