Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411476 Posts in 69369 Topics- by 58424 Members - Latest Member: FlyingFreeStudios

April 23, 2024, 02:56:25 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsPlayerGeneralCore War
Pages: [1] 2 3 4
Print
Author Topic: Core War  (Read 10578 times)
Poor Lazlo
Guest
« on: November 25, 2009, 09:02:17 AM »

So, when I was 13 or so, I was pretty obsessed with Core War. For those not in the know, Core War is a game in which computer programs fight to the death, punching holes in each others' code and commandeering enemy processes. It's pretty exciting, in an extremely nerdy kind of way. There's some old Scientific American articles on the subject here. I'm sorry if this paragraph seems patronising, I actually have no idea how well known the thing is.

Anyway, surfing idly I found that after about five years, I'm still third on the multiwarrior hill (a consequence of inactivity, I think, rather than unbeatable skill), which made me want to jump back in. From what I can tell, the corewar scene is just about dead, but is anyone still playing? Does anyone want to start?  I figure if anyone is going to learn an involved game from twenty years ago, it'll be people on Tigsource.

In any case, I'd like to find people to fight with my scanners.  Gentleman

EDIT: If you want to play, I would recommend using CoreWin (I believe it will run in Wine). You can get it here.

FURTHER EDIT: A list of resources, for if you wish to start playing!

1) A.K. Dewdney's original articles about corewar.

2) An excellent GameSetWatch article describing corewar.

3) Ilnari Karonen's Beginner's Guide to Corewar.

4) The Corewar Wikipedia article.

5) Stephen Morell's My First Corewar Book, Chapters One and Two.

6) The Corewar FAQ.
« Last Edit: November 27, 2009, 12:50:37 PM by Poor Lazlo » Logged
JMickle
Level 10
*****



View Profile
« Reply #1 on: November 25, 2009, 09:04:52 AM »

it seems like a great idea, but would be much more popular if re-made rather than revived.

actually, it seems like and incredible idea.
Logged

Poor Lazlo
Guest
« Reply #2 on: November 25, 2009, 09:17:56 AM »

It's very satisfying to play! A remade version would probably be more popular, but that means someone has to remake it... In the meantime, the existing game is still very functional, and if you have more than a passing interest in maths I would recommend it.

In any case, my MARS (Memory Array Redcode Simulator, for those who don't like acronyms) of choice is CoreWin, which you can find here. The link to it on koth.org is geocities and therefore broken. Sad
Logged
jrjellybeans
Level 3
***


They're All Gonna Laugh At You


View Profile WWW
« Reply #3 on: November 25, 2009, 09:47:06 AM »

I don't understand what the real purpose of the game is.

Like, you point the game towards a program in your computer and then the game simulates a fight between them???
Logged

PGGB
Level 8
***



View Profile
« Reply #4 on: November 25, 2009, 09:52:15 AM »

I don't understand what the real purpose of the game is.

Like, you point the game towards a program in your computer and then the game simulates a fight between them???
No two people write a program which battle each other.

I tried to get into it at one time but resources were kinda scarce and there was no real community to speak of so I gave up.
Logged
s0
o
Level 10
*****


eurovision winner 2014


View Profile
« Reply #5 on: November 25, 2009, 09:53:56 AM »

So it's like these "robot battle" games?
Logged
Poor Lazlo
Guest
« Reply #6 on: November 25, 2009, 10:04:15 AM »

So it's like these "robot battle" games?

Yes, except instead of programming a robot to fight, you are fighting with the actual programs, if that makes sense. So the two programs will try to overwrite each other, and make each other attempt to run unexecutable instructions. For example, the warrior "Dwarf":

       
Code:
        ADD #4, 3        ; execution begins here
        MOV 2, @2
        JMP -2
        DAT #0, #0

This bit of code will copy the "DAT #0, #0" (DATs are unexecutable) every four locations around the core, in the hopes of overwriting a bit of the enemy code, and making it die. Does this make sense? I'm not very good at explaining this, I fear. I strongly advise everyone interested read this guide to redcode.
« Last Edit: November 25, 2009, 10:08:25 AM by Poor Lazlo » Logged
Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #7 on: November 25, 2009, 08:59:43 PM »

I'm into Core War. But... you're 3rd on a hill? I think you're way out of my league, I can't even beat the benchmarks let alone get on a hill.

I'm running a full-blown tournament against all 3 benchmarks to determine my best warrior, which I shall proceed to post here.

Edit: I thought that would take longer. Yay for modern processors eh?

Code: (Pitfall.rc)
;redcode-94
;name Pitfall
;author Core Xii
;strategy .6c pit bomber -> three-pass core-clear
;assert CORESIZE == 8000 && MAXPROCESSES > 1
;length 100
      ORG 85
      PIN 0
      SPL.B  #-1       , >1       
      SPL.B  #-2       , >2       
      SPL.B  #-3       , >3       
      SPL.B  #-4       , >4       
      SPL.B  #-5       , >5       
      SPL.B  #-6       , >6       
      SPL.B  #-7       , >7       
      SPL.B  #-8       , >8       
      SPL.B  #-9       , >9       
      SPL.B  #-10      , >10     
      SPL.B  #-11      , >11     
      SPL.B  #-12      , >12     
      SPL.B  #-13      , >13     
      SPL.B  #-14      , >14     
      SPL.B  #-15      , >15     
      SPL.B  #-16      , >16     
      SPL.B  #-17      , >17     
      SPL.B  #-18      , >18     
      SPL.B  #-19      , >19     
      SPL.B  #-20      , >20     
      SPL.B  #-21      , >21     
      SPL.B  #-22      , >22     
      SPL.B  #-23      , >23     
      SPL.B  #-24      , >24     
      SPL.B  #-25      , >25     
      SPL.B  #-26      , >26     
      SPL.B  #-27      , >27     
      SPL.B  #-28      , >28     
      SPL.B  #-29      , >29     
      SPL.B  #-30      , >30     
      SPL.B  #-31      , >31     
      SPL.B  #-32      , >32     
      SPL.B  #-33      , >33     
      SPL.B  #-34      , >34     
      SPL.B  #-35      , >35     
      SPL.B  #-36      , >36     
      SPL.B  #-37      , >37     
      SPL.B  #-38      , >38     
      SPL.B  #-39      , >39     
      SPL.B  #-40      , >40     
      SPL.B  #-41      , >41     
      SPL.B  #-42      , >42     
      SPL.B  #-43      , >43     
      SPL.B  #-44      , >44     
      SPL.B  #-45      , >45     
      SPL.B  #-46      , >46     
      SPL.B  #-47      , >47     
      SPL.B  #-48      , >48     
      SPL.B  #-49      , >49     
      SPL.B  #-50      , >50     
      SPL.B  #-51      , >51     
      SPL.B  #-52      , >52     
      SPL.B  #-53      , >53     
      SPL.B  #-54      , >54     
      SPL.B  #-55      , >55     
      SPL.B  #-56      , >56     
      SPL.B  #-57      , >57     
      SPL.B  #-58      , >58     
      SPL.B  #-59      , >59     
      SPL.B  #-60      , >60     
      SPL.B  #-61      , >61     
      SPL.B  #-62      , >62     
      SPL.B  #-63      , >63     
      SPL.B  #-64      , >64     
      SPL.B  #-65      , >65     
      SPL.B  #-66      , >66     
      SPL.B  #-67      , >67     
      SPL.B  #-68      , >68     
      SPL.B  #3        , >3       
      SPL.B  #2        , >2       
      SPL.B  #1        , >1       
      SPL.X  #5871     , $5872   
      JMP.B  $-1       , $-2937   
      JMP.B  $-2936    , $0       
      ADD.F  $2939     , $3       
      MOV.I  $2938     , }2       
      MOV.I  $2938     , *1       
      MOV.I  @8808     , $11744   
      DJN.B  $-4       , #499     
      NOP.F  $1        , $6       
      SPL.A  #2        , $6       
      SPL.B  #5        , $6       
      MOV.I  *-3       , >-3     
      JMP.B  $-1       , <-2671   
      DAT.F  $-5       , $6       
      MOV.I  $-14      , $4159   
      MOV.I  $-14      , $4159   
      MOV.I  $-14      , $7093   
      MOV.I  $-8       , $1223   
      MOV.I  $-12      , $1219   
      SPL.B  $1216     , $0       
      MOV.I  $-16      , $1215   
      MOV.I  $-16      , $1215   
      MOV.I  $-14      , $1217   
      MOV.I  $-16      , $1215   
      MOV.I  $-21      , $1210   
      MOV.I  $-14      , $1217   
      MOV.I  $-13      , $1218   
      MOV.I  $-15      , $1216   
      MOV.I  $-18      , $1213   

« Last Edit: November 25, 2009, 09:18:42 PM by Core Xii » Logged
Poor Lazlo
Guest
« Reply #8 on: November 26, 2009, 08:19:08 AM »

I'm into Core War. But... you're 3rd on a hill? I think you're way out of my league...

Not at all... I'm third on the multiplayer hill, which I believe to be the hill no-one cares about. In any case, I last did something in redcode five years ago, so I'm relearning from scratch.

I just learned how an imp-ring works! It's pretty cool.
Logged
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #9 on: November 26, 2009, 08:27:30 AM »

This looks waaaay too complicated for me. Fucking awesome, but complicated.
Logged

Nikica
Level 5
*****


Remember, it’s all in your head.


View Profile
« Reply #10 on: November 26, 2009, 11:19:23 AM »

This looks waaaay too complicated for me. Fucking awesome, but complicated.
Logged
Poor Lazlo
Guest
« Reply #11 on: November 26, 2009, 11:30:02 AM »

This looks waaaay too complicated for me. Fucking awesome, but complicated.

Well, fair enough. I will say, though, that it's a lot less complicated than it seems. As long as you can do modulo maths, you're golden.    Smiley
Logged
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #12 on: November 26, 2009, 11:52:23 AM »

Actually, I keep forgetting what modulo does (or atleast how to use it).
Logged

brog
Level 7
**



View Profile WWW
« Reply #13 on: November 26, 2009, 12:18:25 PM »

Then call it "remainder" and you will not forget.
Logged
Poor Lazlo
Guest
« Reply #14 on: November 26, 2009, 12:29:40 PM »

Then call it "remainder" and you will not forget.

Very true! Or imagine it is a big clock?
Logged
Dacke
Level 10
*****



View Profile
« Reply #15 on: November 26, 2009, 02:47:38 PM »

Write me a tutorial and set up some TIGS-multiplayer, and I'm totally in!

Edit:
http://vyznev.net/corewar/guide.html
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #16 on: November 26, 2009, 10:11:23 PM »

In any case, I last did something in redcode five years ago, so I'm relearning from scratch.

Ah. Yeah, same here, it's been a while.

We should totally arrange some sort of a tournament or something.
Logged
Poor Lazlo
Guest
« Reply #17 on: November 27, 2009, 04:31:17 AM »

We should totally arrange some sort of a tournament or something.

A tournament would be fun! I'd better get better. Smiley
Logged
Dacke
Level 10
*****



View Profile
« Reply #18 on: November 27, 2009, 05:18:29 AM »

Or let's start something and get better together! Learning together, so even total beginners like myself stand some sort of chance  Grin
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
Poor Lazlo
Guest
« Reply #19 on: November 27, 2009, 07:52:17 AM »

I finished my first new warrior! It's pretty simple, and I shall post it here:

Code:
;corewar-94
;name Toothy

launch MOV bait, @bait
ADD.AB clear, launch
SUB clear, bait
JMP launch

bait JMP trap, 0

clear DAT #10, #0

trap SPL 1, <-60
MOV clear, <-1
JMP trap, <-11

END launch

It's a vampire! From what I remember, these fell out of favour because they just weren't as good as other strategies, but I think they are at least the coolest. Anyway, it works a lot like the dwarf I posted before, but instead of dropping deadly DATs all over the core, it lays down JMP instructions which lead to the trap. The trap makes the enemy spawn countless new processes (which will slow down enemy operations), and uses these to execute a core clear, which will drop DAT bombs on every core address, wiping the entire core (except the bit my vampire occupies, of course).

In short, it hijacks enemy processes, and make them run code that is to my benefit.

I haven't bothered running it against any benchmarks, but I'm fairly confident it'll do crap. For starters, I need to choose a better step size than 10 (finding constants that are good is the most boring part of core war, in my opinion), and I'm sure there are lots of ways to make it smaller and more efficient. I think it's an okay first try though Smiley

On a related note, I haven't been able to find any documentation on vampires (I wrote this from scratch, remembering how vamps act)... Has anyone else?

Actually, I keep forgetting what modulo does (or atleast how to use it).

Whoops, no-one actually told you... Basically, it is finding the remainder, like brog said. So 10mod3 is the remainder you get when you divide 10 by 3, which is 1. This is important in corewar because the space in which your programs fight is a loop. The average size of a core is 8000, where instructions 0 and 8000 are the same. Also, all locations are relative, so a program can never know exactly where in the core it is, only where it is relative to everything else.
Logged
Pages: [1] 2 3 4
Print
Jump to:  

Theme orange-lt created by panic