Stories
Slash Boxes
Comments

SoylentNews is people

posted by azrael on Friday October 24 2014, @07:31PM   Printer-friendly
from the teach-me-sensei dept.

Today I discovered an absolute gem from the past.

If you were around in 1984 you might have been super awesome and played core wars.

Core Wars is a programming game in which two or more programs run in a simulated computer with the goal of terminating every other program and surviving as long as possible. Known as Warriors, these programs are are written in an assembly language called Redcode.

Basically it's Counter-Strike/COD for programmers where you can fight in a team team, as a free-for-all, or one-vs-one.

What other cool things from the past might us youngun programmers have missed or not have an appreciation of?

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by cosurgi on Friday October 24 2014, @09:02PM

    by cosurgi (272) on Friday October 24 2014, @09:02PM (#109721) Journal

    I liked that. I even implemented my own variant, where programs lived in a 2D matrix, and each cell contained a super simple assembler instruction and a direction where to go for next instruction (←↓↑→). Doing loops was super funny, because the loops were actually forming a closed loop spatially on 2D matrix, and end of the loop condition was to go in either one direction (loop exit) or another (continue loop). The programs could copy themselves (by copying their own instruction cells into another place) and then fork to start another parallel program. They could randomly mix their code with each other when one was copying to a place where another one was copying too. Also to make it even more fun I introduced mutations which rarely randomly changed the copied code. And new nicer programs evolved :) But they were still doing great, so I added a "radiation" bomb, which randomly altered some cells in 2D matrix into another assembler instruction. That usually killed them all off. But I kept trying, curious if I could evolve a super program that would survive most of what I threw at it.

    And it happened. This program was almost virtually unkillable. Curious at why it happened, I looked at its assembler code. And guess what? The little guys with help of mutations which induced evolution found a loophole in my super simple assembler. After the end of copy-itself loop they had 4 or more "fork" instructions, which caused the copied beast's assembler code to be used simultaneously by 4 or more programs. And they were able to multiply 4 times faster, exponentially with each generation. No random "radiation" bomb would kill them all at once. It was enough if just one survived, and it quickly took over whole 2D matrix again :)

    --
    #
    #\ @ ? [adom.de] Colonize Mars [kozicki.pl]
    #
    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2) by cosurgi on Friday October 24 2014, @09:09PM

    by cosurgi (272) on Friday October 24 2014, @09:09PM (#109725) Journal

    I found it :) omg, I was writing in pascal at that time, 1999. Perhaps I should be able to run it in dosbox.

    PS: backups FTW :)

    --
    #
    #\ @ ? [adom.de] Colonize Mars [kozicki.pl]
    #
    • (Score: 2) by maxwell demon on Saturday October 25 2014, @09:36AM

      by maxwell demon (1608) on Saturday October 25 2014, @09:36AM (#109861) Journal

      PS: backups FTW :)

      Sure. Now if only I could read those old floppy disks containing those backups …

      --
      The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 2) by cosurgi on Friday October 24 2014, @09:24PM

    by cosurgi (272) on Friday October 24 2014, @09:24PM (#109734) Journal
    Here's one of those programs on a 2D matrix. I hope that the text aligns properly.

    ┌──────────────┬──────────────┬──────────────┐
    │ *MOVIP E ↓   │  MOV  C D →  │   LENG F ↓   │
    ├──────────────┼──────────────┼──────────────┤
    │ INC E 3 3 ↓  │  RAND E C ↑  │   PUSH F ↓   │
    ├──────────────┼──────────────┼──────────────┤
    │ MULC E 3 3 → │  MUL E E ↑   │   MOVIP G ↓  │
    ├──────────────┼──────────────┼──────────────┤
    │              │              │   DECS 1 0 ↓ │
    ├──────────────┼──────────────┼──────────────┤
    │              │              │   COPY A D ↓ │
    ├──────────────┼──────────────┼──────────────┤
    │              │  ZERO A ←    │   INCIP A ↓  │
    ├──────────────┼──────────────┼──────────────┤
    │              │  SPAWN C ↑   │   INCIP D ↓  │
    ├──────────────┼──────────────┼──────────────┤
    │              │  JMNZ G ↑    │   DUP ←      │
    └──────────────┴──────────────┴──────────────┘
    --
    #
    #\ @ ? [adom.de] Colonize Mars [kozicki.pl]
    #
    • (Score: 2) by cosurgi on Friday October 24 2014, @09:32PM

      by cosurgi (272) on Friday October 24 2014, @09:32PM (#109740) Journal

      Aha, by looking at it, I can't see the loop :) Maybe it's not in this one, I picked a random saved program.

      But I think that you get the point now - the loops are spatial. If that instruction "ZERO A ←" was a loop condition to go right, instead of ending the program, it would continue the loop.

      --
      #
      #\ @ ? [adom.de] Colonize Mars [kozicki.pl]
      #