• Looking for ideas/optimizations/help on a warrior - THANKS ;)

    From Francisco Jose Castillo Mogollon@21:1/5 to All on Sat Jan 28 11:51:43 2023
    Hello everyone!
    I am a fan of Redcode and passionate about this art. Last year I participated in a local corewars tournament and this year I wanted to optimize the warrior I participated with. It is a version of Recon with bootstrap and decoy. I pass you the code. I
    appreciate any help, tips or ideas!!

    <+++++++++++++++++++++++++++++++++++++>
    ;redcode-94
    ;assert 1
    ;name CHaiNS_oF_PaiN
    ;kill CHaiNS_oF_PaiN
    ;author Patxy
    ;strategy Recon clone with bootstrap & decoy

    Timer equ 400 ; cuanta atrás para el borrado 400*4 posiciones = 1600+1100 >32%
    ; Compara posiciones en una horquilla de 6 celdas
    ; Cuando se encuentre algo, lo limpia con un manto de 14 SPLs,
    ; con este formato: ..X.....X.....
    ; Una vez consumido el Timer y cubierto la memoria con una malla de ataques,
    ; comenzará con un borrado de memoria.

    rStep equ 6557
    ; caza secuencias de pasos de 3, 7, 9, and 11 saltos
    ; 6557 * 231 = 2667 (2667 * 3 = 1)
    ; 6557 * 99 = 1143 (1143 * 7 = 1)
    ; 6557 * 77 = 889 ( 889 * 9 = 1)
    ; 6557 * 63 = 5091 (5091 * 11 = 1)

    ; Copiamos el guerrero a otra posición de la memoria, a 2/3 de la memoria rPlaceA equ 5334;
    reconA mov rEnd, <rDest ;salto a location A
    mov {reconA, <rDest
    mov {reconA, <rDest
    mov {reconA, <rDest
    mov {reconA, <rDest
    rSrc jmn reconA, {reconA
    rDest spl rPlaceA+5, rPlaceA+15
    for 5
    dat 0, 0
    rof

    ;warrior: SNE scanner con SPL wiper
    rPtr equ (rScan-8)
    dat 0, 0
    dat 19, 19
    rDiff spl #-rStep, #-rStep
    rWipe mov rDiff, >rPtr ; golpea con una capa de SPLs
    rW2 mov *rWipe, >rPtr ; más tarde >> borrado de la memoria
    djn.a rWipe, rLength
    rLoop sub rDiff, @rS2
    rScan sne (rStep-1), (rStep-7) ; compara 2 posiciones
    sub rDiff, rScan
    rS2 seq *rScan, @rScan ; compara otras 2 posiciones
    slt.a #20, rScan ; evita sus posiciones del scanner
    rTimer djn rLoop, #Timer ; cuenta-atrás para el borrado de la memoria rLength sub.ba #0, #-7 ; inicializa la capa de SPLs
    rTweak mov.ab @rS2, @rWipe
    rT2 jmn *rW2, rTimer ; cuando el contador expire,
    rEnd djn.a <rTweak, {rT2 ; comenzamos el borrado de la memoria

    for 5
    dat 0, 0
    rof

    ;decoy
    idx for (MAXLENGTH-CURLINE)
    SPL.F ((1+idx%6)*23),((1+idx%6)*91) ; decodificación enorme para confundir a los scanners
    rof
    end reconA
    <+++++++++++++++++++++++++++++++++++++>

    And by the way, ask yourself, if anyone has (or knows where to get) the book "CoreWar Krieg der Kerner Handbuch fur Einsteiger" by Sascha Zapf, in English!! (or Spanish) - Someone knows?

    Thank you!!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Metcalf@21:1/5 to All on Wed Feb 1 11:35:27 2023
    Hi,

    On Sat, 28 Jan 2023 11:51:43 -0800, Francisco Jose Castillo Mogollon
    wrote:

    Hello everyone!
    I am a fan of Redcode and passionate about this art. Last year I
    participated in a local corewars tournament and this year I wanted to optimize the warrior I participated with. It is a version of Recon with bootstrap and decoy. I pass you the code. I appreciate any help, tips or ideas!!

    Recon is really effective, but I can see a few opportunities. If you
    haven't already, it's worth setting up a benchmark to test different
    versions of CHaiNS. E.g. pick ~20 warriors from the Koenigstuhl top 50
    to test against.

    You could try different values of rStep to change the scan pattern.
    There's a tool called Randy (available at http://inversed.ru/CoreWar.htm)
    which you can use to create multiple copies with different constants.
    Then run them all against the benchmark. Also, try the same for Timer.

    CHaiNS is detecting its own decoy, slowing it down. The scan compares locations which are 6 cells apart, so try changing the decoy so the
    contents of decoy are the same as decoy+6, decoy+1 the same as decoy+7,
    decoy+x the same as decoy+x+6, etc. Then try changing the boot distance
    to avoid detect the decoy for as long as possible.

    And by the way, ask yourself, if anyone has (or knows where to get) the
    book "CoreWar Krieg der Kerner Handbuch fur Einsteiger" by Sascha Zapf,
    in English!! (or Spanish) - Someone knows?

    Unfortunately, the Handbook is only available in German, but there are
    quite a few guides and tutorials covering similar topics in English.

    Good luck with the tournament.

    John

    PS - have you tried submitting to the KOTH / SAL hills? CHaiNS might
    score well on the No Pspace and Multiwarrior hills :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Francisco Jose Castillo Mogollon@21:1/5 to All on Wed Feb 1 16:49:11 2023
    El miércoles, 1 de febrero de 2023 a las 12:35:29 UTC+1, John Metcalf escribió:
    Hi,

    On Sat, 28 Jan 2023 11:51:43 -0800, Francisco Jose Castillo Mogollon
    wrote:
    Hello everyone!
    I am a fan of Redcode and passionate about this art. Last year I participated in a local corewars tournament and this year I wanted to optimize the warrior I participated with. It is a version of Recon with bootstrap and decoy. I pass you the code. I appreciate any help, tips or ideas!!
    Recon is really effective, but I can see a few opportunities. If you
    haven't already, it's worth setting up a benchmark to test different versions of CHaiNS. E.g. pick ~20 warriors from the Koenigstuhl top 50
    to test against.

    You could try different values of rStep to change the scan pattern.
    There's a tool called Randy (available at http://inversed.ru/CoreWar.htm) which you can use to create multiple copies with different constants.
    Then run them all against the benchmark. Also, try the same for Timer.

    CHaiNS is detecting its own decoy, slowing it down. The scan compares locations which are 6 cells apart, so try changing the decoy so the
    contents of decoy are the same as decoy+6, decoy+1 the same as decoy+7, decoy+x the same as decoy+x+6, etc. Then try changing the boot distance
    to avoid detect the decoy for as long as possible.
    And by the way, ask yourself, if anyone has (or knows where to get) the book "CoreWar Krieg der Kerner Handbuch fur Einsteiger" by Sascha Zapf,
    in English!! (or Spanish) - Someone knows?
    Unfortunately, the Handbook is only available in German, but there are
    quite a few guides and tutorials covering similar topics in English.

    Good luck with the tournament.

    John

    PS - have you tried submitting to the KOTH / SAL hills? CHaiNS might
    score well on the No Pspace and Multiwarrior hills :-)
    I thank you very much John! I'll put your recommendations into practice and I'm sure I'll get the best version of CHaiNS for the tournament. I'll tell you how it turns out! ;)

    And about participating in KOTH/SAL hills, yes!!, I could also try it! ¿what steps should i follow?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Metcalf@21:1/5 to John Metcalf on Fri Feb 3 19:05:33 2023
    On Fri, 03 Feb 2023 19:02:06 +0000, John Metcalf wrote:

    On Wed, 01 Feb 2023 16:49:11 -0800, Francisco Jose Castillo Mogollon
    wrote:

    And about participating in KOTH/SAL hills, yes!!, I could also try it!
    ¿what steps should i follow?

    Hi, just send an email with the correct ;redcode declaration (e.g. ;redcode-94nop or ;redcode-94m). Just make sure your email is set to
    plain text and there aren't any non-ASCII characters. There's a list of hills and more info in the FAQ:

    Sorry, missed the link :-)

    * https://corewar.co.uk/faq/corewar-faq.htm#WhatIsKotH

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Metcalf@21:1/5 to All on Fri Feb 3 19:02:06 2023
    On Wed, 01 Feb 2023 16:49:11 -0800, Francisco Jose Castillo Mogollon
    wrote:

    And about participating in KOTH/SAL hills, yes!!, I could also try it!
    ¿what steps should i follow?

    Hi, just send an email with the correct ;redcode declaration
    (e.g. ;redcode-94nop or ;redcode-94m). Just make sure your email is set
    to plain text and there aren't any non-ASCII characters. There's a list
    of hills and more info in the FAQ:

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)