<BACK>

  Mini challenge #6: "The smart redcoder" <closed>

You probably know that i love p-space so this time i propose a p-challenge, trying to increase newbies interest on p-space handling.
You have to create a p-warrior with three given strategies. No other attacks or strategies are allowed, you just have to create the p-brain.
Warriors will compete in a round robin without self-fights, so it works like a Redcoders Frenzy round.
Pmars command line:

pmars -r 5000 -l 100 -d 200 entry1.red entry2.red

;Components for MC#6:

;strategy Imp
imp: mov.i #4,1
end imp

;strategy Core clear
ptr equ clear-3
clear: mov bmb,}ptr ;<-- must start here
mov bmb,}ptr
jmp -2
bmb: dat 7,0
end clear

;strategy Imp-gate, (wimp)
gate: jmp #0,<-3
end gate

Also you can download components in a text file

Imp beats Core clear by 100%
Core clear beats the Imp-gate by 100%
Imp-gate beats Imp by 100%
Imp and Imp-gate ties against themselves by 100%
Core clear wins and loses 50% against self.

Each author can send two entries.

Components must start their execution where "end" points to, and cannot be modiffied or booted.

Hints:

* As you see, components score perfect, like stone-scissors-paper game. The objetive is to create a p-switcher smart enough to beat your opponents, who will be doing the same, so try to prevent their switch.

* I wouldn't create a single switch-on-loss or on-loss-or-tie. They are too predictible.

* Take a look to the Fizmo's Corewar Lexicon, where all kind of switchers are explained: www.corewar.info/

* At first sight, the addaptative switcher seems to be the best engine, but be careful, it has a clear weakness: Core clear wins against self 50%, instead of tieing. This could be used by opponents to confuse it. Also other slight weaknesses can be found. The version appearing in th Lexicon is designed for RF7, it may need some tweaking and can be written shorter.

* Another option are the table switchers, who are based on state diagrams. Their success depends on the states sequence, that must be carefully designed.

* Other ideas can be very successful. Your P-brain has much time to think, and can be up to 94 instructions long.

(entries will be listed by score)

Author

Entry name

Score

Strategy

Germán Labarga

Mem^3

101802, (100%)

Expanded adaptive

Lukasz Adamowski

PointA Rewritten

95975, (94.27%)

John Morahan

A little smarter

79498, (78.09%)

Adaptive random switcher

Zul Nadzri

Dumb25

78679, (77.29)

John Morahan

Not so smart

78016, (76.63%)

Random switcher

David Houston

Random switcher

77471, (76.10%)

Random switcher

Christian Schmidt

pIdee

75367, (74.03%)

Zul Nadzri

Nax

75181, (73.85%)

Mmh, sequence analizer?

Lukasz Adamowski

Universal Switch-Board

73530, (72.23%)

Table switcher

Christian Schmidt

3p-TAB3-A

72592, (71.31%)

P^3

German Labarga

Mutable

55405, (54.42%)

Mutating p^3

Blake Escritt

Doesn't Really Matter

55074, (54.10%)

Anti-adaptives

 

Thanks to all authors taking part.