Live data from Hacker News

Two Programs Enter, One Program Leaves

codinghorror.com

1–10 of 38 posts

Re: Two Programs Enter, One Program Leaves

#2
What happens if the instruction pointer for, say, process A, steps into the code space for another process, B? Does the simulator treat it as an illegal instruction causing A to lose? Or does process A continue, but executing B's code?

Re: Two Programs Enter, One Program Leaves

#3
Microsoft did something similar to promote the .NET framework in it's early days. They launched the Terrarium competition http://terrarium2.codeplex.com/ where you would code your creature's AI in C# or Managed C++ and ship it as a DLL that would compete against other peoples creatures.

Re: Two Programs Enter, One Program Leaves

#7
post #2

What happens if the instruction pointer for, say, process A, steps into the code space for another process, B? Does the simulator treat it as an illegal instruction causing A to lose? Or does process A continue, but executing B's code?

I think it treats it as a legal instruction.

What I don't get is the replicator strategy. How does replicating yourself help not die? Even if you replicate yourself to all the memory except one address -- but that one address is where your IP is you're screwed. It seems like repairing yourself and attacking the opponent are the only feasible strategies -- at least if I understand correctly.

Re: Two Programs Enter, One Program Leaves

#9
post #8

Back in the day I tried applying genetic algorithms to corewars as a high school science fair project. I lost. They had no idea what was talking about. Early lesson in the importants of communicating technical ideas.

Oh, you lost the science fair. How did your code perform in battle?
Post reply on HN