Author Topic: [Core Wars] Post Your Warriors  (Read 6827 times)

0 Members and 1 Guest are viewing this topic.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
[Core Wars] Post Your Warriors
« on: March 22, 2012, 08:28:23 pm »
Here's my first warrior. I call it a Bomb Glider

Code: [Select]
;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.
« Last Edit: March 23, 2012, 12:11:40 am by HOMER-16 »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: [Core Wars] Post Your Warriors
« Reply #1 on: March 22, 2012, 10:53:38 pm »
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
« Last Edit: March 28, 2012, 02:10:44 pm by C0deH4cker »

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: [Core Wars] Post Your Warriors
« Reply #2 on: March 23, 2012, 12:11:18 am »
I improved mine. It's now complete.

Code: [Select]
;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

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [Core Wars] Post Your Warriors
« Reply #3 on: March 23, 2012, 12:19:47 am »
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.

Code: [Select]
:*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

Code: [Select]
:*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!
« Last Edit: March 23, 2012, 01:40:43 am by Builderboy »

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: [Core Wars] Post Your Warriors
« Reply #4 on: March 23, 2012, 02:00:47 pm »
I wrote another rather simple one today

Code: [Select]
;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.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: [Core Wars] Post Your Warriors
« Reply #5 on: March 27, 2012, 08:54:48 pm »
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
Code: [Select]
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.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: [Core Wars] Post Your Warriors
« Reply #6 on: March 27, 2012, 11:00:10 pm »
this is mine from memory. just a variation from the normal bomb. assumes a core size of 1024.

Code: [Select]
:*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?
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [Core Wars] Post Your Warriors
« Reply #7 on: March 27, 2012, 11:09:30 pm »
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? 

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: [Core Wars] Post Your Warriors
« Reply #8 on: March 28, 2012, 01:13:25 pm »
Ok, I have a warrior that actually works well.
Code: [Select]
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?