Omnimaga
General Discussion => Technology and Development => Gaming Discussion => Topic started by: Scipi on March 22, 2012, 08:28:23 pm
-
Here's my first warrior. I call it a Bomb Glider
;redcode
;name Bomb Glider
;author Thomas Stone
;strategy Imp/Stone
;Moves forward laying bombs directly in front of it and continuously behind it
MOV -1, <0
MOV 2, >1
JMP -2, #2
DAT #0, #0
It's not finished yet, but it's workable. I want to make it able to propel itself forward through the core, perhaps with a second process.
-
this is mine from memory. just a variation from the normal bomb. assumes a core size of 1024.
:*ORG TOP
Lbl TOP
MOV X /X
ADD E1019 X
JMP TOP
Lbl X
DAT E0 E1019
-
I improved mine. It's now complete.
;redcode
;name Bomb Glider
;author Thomas Stone
;strategy Imp/Stone
;Moves forward laying bombs directly in front of it and continuously behind it
MOV 10, >7 ;Copier
MOV 10, >6
MOV 10, >5
MOV 10, >4
SUB #3, 3 ;Used to set pos for next Crawler
SUB #2, 6 ;Dec pos for each Rear Bomb
DJN -6, #1 ;Jump to prevent excess processes
SPL 8, #7 ;B is pos to start copying
NOP #0, #0 ;Used for timing Purposes
JMP -9 ;Start copy loop
DAT #0, #0 ;Bomb
MOV -1, -16 ;Keeps track of rear Bomb Pos
MOV -2, 2 ;Places forward Bomb
JMP -1 ;Crawler loop
DAT #0, #0 ;End of Code
-
Here is my recently coded Warrior. It first copies itself to a new location and starts a new process there, and then proceeds to start clearing the memory in front of it. It is hopefully both resilient because it has many processes, and hopefuly lethal since it is attacking a large percentage of the core.
:*ORG CPY
Lbl CPY
MOV )X }X
JMN CPY X
NOP (69 {69
SPL 61
ADD e2 X
Lbl CLR
MOV X (X
JMP CLR
Lbl X
DAT e73 e9
And here is a different version of the original bomber that instead of bombing with DAT instructions, bombs with SPL 0 instructions, causing your opponent to create unlimited numbers of subroutines, thus preventing them from functioning normally. After you finish bombing, your opponent should be subdued, so the program enters the 'clear' mode, where it goes through and clears every instruction until its opponent is dead
:*ORG TOP
Lbl TOP
MOV S /S
ADD e4 S
JMN TOP S
Lbl CLR
MOV D (D
JMP CLR
Lbl S
SPL 0 e8
Lbl D
DAT e0 e2
And here is the source, as well as a screenshot of them doing battle! Scan won that round, and as you can see, as soon as the Split Bombs hit the other program, all movement completely stopped and it's processes completely maxed out!
-
I wrote another rather simple one today
;redcode
;name Imp Trap
;author Thomas Stone
;strategy Imp
;Attempts to turn opponent into imp and then bomb them
MOV 5, -1 ;Imp Trap
DJN -1, #1
NOP 0, 0
SPL 3 ;Start Imp
JMP -4 ;Start Trap
DAT #0, #0 ;Bomb
MOV 0, 1 ;Imp
What this basically does is start an imp as a second process and then keep planting bombs in a single area hoping to stop the Imp before it overwrites itself. In the process the Imp hopefully turns the opposing warrior into an Imp as well.
-
Here is a small bomber. I tried to make it non-suicidal, but my attempt did not succeed :( The good news is that it usually kills everything before it self destructs :P
SPL 1
SPL 1
SPL 1
LBL T
MOV X /X
ADD E23(tweak for best results) X
JMP T
LBL X
DAT E0 E4
If anyone could help with my... suicidal tendencies, I would be grateful.
-
this is mine from memory. just a variation from the normal bomb. assumes a core size of 1024.
:*ORG TOP
Lbl TOP
MOV X /X
ADD [sub]E[/sub]1019 X
JMP TOP
Lbl X
DAT [sub]E[/sub]0 [sub]E[/sub]1019
Wouldnt it be best to add a assert for making sure the core size is correct?
-
There is no assertion in my version of core wars, since the core size will remain constant across all versions. You can, however, use negative numbers, which will automatically be converted into the correct positive offset. So -1 will be converted to 1023 for example.
Also, mrmprog, the best way would be to make the increment of X a number that is divisible by the core size, like 8 or 16. That way as long as you start X in the right location, X will miss you each time it goes around. If you want the increment to be a value that isn't divisible by the core size, you would have to get a little tricky. Also, why are you splitting into so many different sub programs?
-
Ok, I have a warrior that actually works well.
LBL A
MOV X /X
MOV D /D
ADD E5 X
SUB E10 D
JMP A
LBL X
DAT E0 E7
LBL D
SPL O E 1016
It bombs in two directions out. Hopefully, the SPL 0 bomb locks up the enemy, and then the dat kills it. I feel like there is a better way to do the "dual bombing" thing though. Can anyone tell me if there is?