Advertisement
masaakiNakamura

AlphaGo kifu playback for IchigoJam V3 2nd game

Apr 2nd, 2016
2,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ' AlphaGo Kifu playback (2nd Game)
  2. ' Revesion 3.0
  3. '
  4. ' Requirment: IchigoJam V1.1 beta6 or later
  5. '
  6.  
  7.  
  8. NEW
  9.  
  10. 10 'igo kifu V3
  11. 20 POKE#700+8*24,60,102,195,129,129,195,102,60,60,126,255,255,255,255,126,60
  12. 100 L=#A5:M=#E8:N=#900:Q=19:CLS:FORY=1TOQ:C=Y*32+N:FORX=1TOQ:C=C+1:POKEC,L:NEXT:NEXT:S=3814:B=0:T=760
  13. 160 IFX>Q?"END":END
  14. 170 X=PEEK(S):IFX<#F0Y=(X&#F)+1:X=(X>>4)+1ELSES=S+1:Y=PEEK(S):X=(X<<3+Y>>5)&#1f+1:Y=Y&#1F+1
  15. 180 C=N+Y*32+X
  16. 610 POKEC,M+B:B=B^1:E=B|#F8:FORY=1TOQ:C=Y*32+N:FORX=1TOQ:C=C+1:IFPEEK(C)=B|MPOKEC,E
  17. 660 NEXT:NEXT
  18. 670 D=USR(#E20,B)
  19. 770 FORY=1TOQ:C=Y*32+N:FORX=1TOQ:C=C+1:IFPEEK(C)&#FE=#F8:POKEC,L
  20. 790 NEXT:NEXT:S=S+1:GOTO160
  21.  
  22.  
  23. ' Machine code
  24.  
  25. poke#e20,#f0,#b5,#02,#1c,#e8,#32,#1d,#4b,#13,#25,#ce,#18,#00,#24,#33,#1c
  26. poke#e30,#13,#3b,#01,#33,#1f,#78,#f7,#2f,#20,#d9,#5f,#78,#97,#42,#01,#d0
  27. poke#e40,#a5,#2f,#01,#d1,#1a,#70,#01,#24,#5f,#1e,#3f,#78,#97,#42,#01,#d0
  28. poke#e50,#a5,#2f,#01,#d1,#1a,#70,#01,#24,#1f,#1c,#20,#37,#3f,#78,#97,#42
  29. poke#e60,#01,#d0,#a5,#2f,#01,#d1,#1a,#70,#01,#24,#1f,#1c,#20,#3f,#3f,#78
  30. poke#e70,#97,#42,#01,#d0,#a5,#2f,#01,#d1,#1a,#70,#01,#24,#b3,#42,#d8,#d1
  31. poke#e80,#1e,#1c,#01,#3d,#20,#36,#00,#2d,#d1,#d1,#00,#2c,#cb,#d1,#40,#00
  32. poke#e90,#40,#42,#00,#04,#00,#14,#f0,#bc,#02,#bc,#08,#47,#13,#09,#00,#00
  33.  
  34. '
  35. ' Source code of Machine code
  36. '
  37. '#include <stdint.h>
  38. 'int16_t usr_sample(int16_t B, void *mem)
  39. '{
  40. '    int e;
  41. '    int x;
  42. '    int y;
  43. '    int d;
  44. '    char *c;
  45. '    int f = 1;
  46. '    e = 0xe8 + B;    
  47. '    while(f)
  48. '    {
  49. '      f = 0;
  50. '      for(y=0; y<19; y++)
  51. '      {
  52. '        c=y * 32 + mem + 0x900;
  53. '        for(x=0; x<19; x++)
  54. '        {
  55. '            c++;
  56. '            if (*c >= 0xf8)
  57. '            {
  58. '                d=*(c+1);
  59. '                if((d==e)|(d==0xa5)){*c = e; f= 1;}
  60. '                
  61. '                d=*(c-1);
  62. '                if((d==e)|(d==0xa5)){*c = e; f= 1;}
  63. '                
  64. '                d=*(c+32);
  65. '                if((d==e)|(d==0xa5)){*c = e; f= 1;}
  66. '                
  67. '                d=*(c-32);
  68. '                if((d==e)|(d==0xa5)){*c = e; f= 1;}
  69. '            }
  70. '        }
  71. '      }
  72. '    }
  73. '
  74. '  return -2 * B;
  75. '}
  76. '
  77.  
  78. 'kifu 2nd game
  79.  
  80. POKE3814,241,227,240,111,35,242,15,241,207,241,208,241,176,241,240,45
  81. POKE3830,240,176,241,143,242,13,130,57,241,238,242,14,240,79,240,80
  82. POKE3846,240,48,46,240,47,30,240,112,240,143,62,29,240,113,44,241
  83. POKE3862,47,38,67,242,5,242,4,241,229,211,241,232,233,232,217,199
  84. POKE3878,240,207,240,208,61,60,94,240,239,126,78,77,93,76,75,92
  85. POKE3894,109,91,110,74,58,59,43,71,56,241,233,242,8,242,37,242
  86. POKE3910,38,163,125,236,242,36,242,35,242,69,88,106,124,141,123,174
  87. POKE3926,241,79,98,53,131,146,100,54,37,39,23,55,24,115,116,99
  88. POKE3942,83,114,84,66,103,82,104,136,122,138,139,140,137,155,153,133
  89. POKE3958,172,171,185,186,190,184,169,40,41,201,241,177,241,145,241,112
  90. POKE3974,241,111,241,144,241,175,241,113,188,167,118,242,2,242,3,242
  91. POKE3990,34,241,226,242,67,102,36,19,242,1,120,150,121,225,241,225
  92. POKE4006,241,224,209,52,68,105,119,73,213,197,196,242,42,87,75,215
  93. POKE4022,214,182,183,198,230,166,216,151,208,168,200,152,210,193,227,194
  94. POKE4038,226,241,81,241,146,142,241,15,158,157,241,17,240,241,242,11
  95. POKE4054,242,43,242,12,242,44,14,28,189,173,206,20,4,5,3,192
  96. POKE4070,176,224,51,22,177,241,237,237,240,145,240,81,240,175,241,16
  97. POKE4086,240,240,242,9,242,41,241,82,242,148
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement