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?
Two Programs Enter, One Program Leaves
11–20 of 38 posts
Re: Two Programs Enter, One Program Leaves
#12Back 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?
Really required a large number of generations, which my poor turbo pascal skills or lack of hardware didn't really provide. I wonder if I can find that code on a floppy somewhere...
Re: Two Programs Enter, One Program Leaves
#13After watching that animation for a bit I can't help contemplating some combination of Core War and Minecraft.... :-)
Re: Two Programs Enter, One Program Leaves
#14Re: Two Programs Enter, One Program Leaves
#15What 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
#16What 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
#17Earlier quoted context omitted.
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.
Replicators split into multiple processes, each with its own IP. A program isn't considered dead until all its processes are killed. If one of its processes stumbles across a bad address, the others aren't affected.
Re: Two Programs Enter, One Program Leaves
#18I couldn't find a Javascript environment for running this. Anybody knows if it exists? If not, who's up for a github night ? ;-)