Maker Pro
Maker Pro

Skybuck's Wolfram (Turing-Like) Machine implementation

S

Skybuck Flying

It also seems JMZ has parameters swapped.

Original specification says:

if a = 0 jump to b.

However WinCore seems to work vice versa:

if b=0 jump to a.

Bye,
Skybuck.
 
S

Skybuck Flying

Or maybe I am doing something wrong with the jmz instructions...

Weird.

Bye,
Skybuck.
 
S

Skybuck Flying

No I was correct. It's reversed. I just tried it differently that's why I
wasn't sure.

It's confusing also because sometimes @Offset has to be used and sometimes
just Offset.

For example:

Offset dat #5
jmz 2, Offset


Will jump to next next instruction if offset is zero.

However:

jmz 2, @Offset

Does something completely different ?

Weird.

Bye,
Skybuck.
 
S

Skybuck Flying

Hello,

Here is my First RedCode Warrior: The Jumping Imp ! ;) :D Version 0.03 !

The program simply copies itself to another location in memory and then
executes itself from there and repeats itself.

I was just curious if it could be done and as a practice.

And it does work and it's nice... but it's not much of a warrior.

It gets bombed... or it gets eating by the simple imp ;)

Cool stuff though ! ;)

Wow almost forgot the code here it is ;):

;redcode
;name JumpingImp
;author Skybuck Flying
;strategy paper (replicator)
;history Skybuck's First Warrior :) version 0.03 created on 31 october 2007
works/tested in WinCore 2.3
jmp Initialization
Source dat #0
Dest dat #0
Counter dat #0
Target dat #18 ; must equal dest initialization -2
Initialization mov #-1, Source
mov #20, Dest
mov #15, Counter
CopyRoutine mov @Source, @Dest
add #1, Source
add #1, Dest
sub #1, Counter
jmz @Target, Counter
jmp CopyRoutine
dat #0

Any improvements to the code to make it shorter/execute faster are welcome !
;)
send comments to skybuck 2000 at hotmail dot com

Bye,
Skybuck.
 
S

Skybuck Flying

Hello,

Here is my second warrior: The Duplicating Imp, it's based on my first
warrior: The Jumping Imp.

The duplicating imp simply executes it's copies.

Maybe it could still be better :) But for now it seems to always win from
the jumping imp ;)

Duplicating Imp Code:

;redcode
;name DuplicatingImp
;author Skybuck Flying
;strategy paper (replicator)
;history Skybuck's Second Warrior Version 0.01 created on 31 october 2007
works/tested in WinCore 2.3
begin jmp Initialization
Source dat #0
Dest dat #0
Counter dat #0
Target dat #18 ; must equal dest initialization -2
Initialization mov #-1, Source
mov #20, Dest
mov #15, Counter
CopyRoutine mov @Source, @Dest
add #1, Source
add #1, Dest
sub #1, Counter
jmz 2, Counter
jmp CopyRoutine
spl @Target
jmp begin

Yeah I was lazy I simply modified a little bit the jumping imp :)

I have a new idea for a duplicator/executor etc but need to write new code
which is hard because I still don't quite understand everything ;)

Bye,
Skybuck.
 
S

Skybuck Flying

Also kinda sux how the first bot is always at core zero (wincore 2.3) ?

Oh well at least easy debugging that's probably why they did it..

But it's bad too I tried another bot... but it only works from core 0..

So not so good.

Bye,
Skybuck.
 
S

Skybuck Flying

Yeah I am gonna look for a redcode reference guide to better understand the
language/instructions because that's not terrible clear so far ;)

Bye,
Skybuck.
 
S

Skybuck Flying

Hello,

Here is some concept code:

mov 0, 0
cmp @-1, @-1
mov 0, 0
mov 0, 0

Just to test if it's possible to detect if an instruction equals another
instruction.

Maybe this can be used to detect "dat #0" bombs ;)

I'll give it a try here:
jmp 2
dat #0
cmp @-1, @-1
dat #0
mov 0, 0

This should skip over the bombs and still execute the mov ;)

Cool... I think now programs can be "dual" written.

Just copy every instruction... and this could make it survive bombs or
something.

Or maybe there are other bomb surviving techniques... like copieing itself
multiple times the instructions..

Hmm.. I am kinda hungry... this prevent me from putting time in it..

I am hasty... if I spent more time on it I might come up with something..

But I am going in a possible good direction LOL :D

Bye,
Skybuck.
 
Top