bioshogi 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (282) hide show
  1. checksums.yaml +4 -4
  2. data/.dumbjump +4 -0
  3. data/A/342/206/222B/342/206/222C/346/210/246/346/263/225.txt +2 -2
  4. data/Gemfile.lock +1 -1
  5. data/README.org +3 -3
  6. data/lib/bioshogi/ai/brain.rb +6 -6
  7. data/lib/bioshogi/analysis/analyzer.rb +66 -8
  8. data/lib/bioshogi/analysis/analyzer_mod.rb +2 -9
  9. data/lib/bioshogi/analysis/attack_info.rb +231 -227
  10. data/lib/bioshogi/analysis/{tech_accessor.rb → basic_accessor.rb} +4 -4
  11. data/lib/bioshogi/analysis/board_piller_methods.rb +9 -9
  12. data/lib/bioshogi/analysis/defense_info.rb +132 -132
  13. data/lib/bioshogi/analysis/file_normalizer.rb +1 -1
  14. data/lib/bioshogi/analysis/frequency.rb +368 -311
  15. data/lib/bioshogi/analysis/note_info.rb +6 -6
  16. data/lib/bioshogi/analysis/rocket_analyzer.rb +45 -58
  17. data/lib/bioshogi/analysis/shape_info.rb +73 -19
  18. data/lib/bioshogi/analysis/style_accessor.rb +22 -19
  19. data/lib/bioshogi/analysis/tactic_hit_turn_table.rb +8 -3
  20. data/lib/bioshogi/analysis/tactic_hit_turn_table_generator.rb +15 -14
  21. data/lib/bioshogi/analysis/tactic_info.rb +2 -2
  22. data/lib/bioshogi/analysis/technique_info.rb +3 -4
  23. data/lib/bioshogi/analysis/technique_verify_info.rb +627 -0
  24. data/lib/bioshogi/analysis//345/202/231/350/200/203//345/220/215/344/272/272/343/201/253/345/256/232/350/267/241/343/201/252/343/201/227.kif +4 -2
  25. data/lib/bioshogi/analysis//345/202/231/350/200/203//345/244/247/351/247/222/345/205/250/343/203/226/343/203/203/343/203/201.kif +4 -0
  26. data/lib/bioshogi/analysis//345/202/231/350/200/203//345/257/276/347/251/264/347/206/212.kif +3 -2
  27. data/lib/bioshogi/analysis//345/202/231/350/200/203//346/214/201/344/271/205/346/210/246.kif +2 -2
  28. data/lib/bioshogi/analysis//345/202/231/350/200/203//347/251/264/347/206/212.kif +3 -2
  29. data/lib/bioshogi/analysis//345/202/231/350/200/203//347/251/264/347/206/212/343/201/256/345/247/277/347/204/274/343/201/215.kif +3 -2
  30. data/lib/bioshogi/analysis//345/202/231/350/200/203//350/203/214/346/260/264/343/201/256/351/231/243.kif +7 -3
  31. data/lib/bioshogi/analysis//345/202/231/350/200/203//351/225/267/346/211/213/346/225/260.kif +1 -2
  32. data/lib/bioshogi/analysis//345/202/231/350/200/203//351/247/222/346/237/261.kif +4 -2
  33. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/201/202/343/201/232/343/201/276/343/202/204/345/233/262/343/201/204.kif +1 -1
  34. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/201/213/343/202/223/343/201/264/343/202/207/343/201/206/345/233/262/343/201/204.kif +4 -2
  35. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/202/252/343/203/252/343/202/270/343/203/212/343/203/253/351/233/201/346/234/250.kif +1 -1
  36. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/202/252/343/203/274/343/203/253/343/203/211/351/233/201/346/234/250.kif +1 -1
  37. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/202/253/343/202/277/345/233/262/343/201/204.kif +3 -1
  38. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/203/204/343/203/216/351/212/200/345/233/262/343/201/204.kif +1 -1
  39. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/203/204/343/203/216/351/212/200/351/233/201/346/234/250.kif +1 -1
  40. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/203/234/343/203/212/343/203/263/343/202/266/345/233/262/343/201/204.kif +1 -1
  41. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/203/237/343/203/254/343/203/213/343/202/242/343/203/240/345/233/262/343/201/204.kif +6 -3
  42. data/lib/bioshogi/analysis//345/233/262/343/201/204//343/203/242/343/203/216/343/203/254/343/203/274/343/203/253/345/233/262/343/201/204.kif +1 -1
  43. data/lib/bioshogi/analysis//345/233/262/343/201/204//344/270/255/344/275/217/343/201/276/343/201/204.kif +2 -0
  44. data/lib/bioshogi/analysis//345/233/262/343/201/204//344/270/262/343/202/253/343/203/204/345/233/262/343/201/204.kif +1 -1
  45. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/217/263/347/237/242/345/200/211.kif +1 -1
  46. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/233/233/346/236/232/347/251/264/347/206/212.kif +1 -1
  47. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/233/233/346/236/232/347/276/216/346/277/203.kif +1 -1
  48. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/233/233/346/236/232/351/212/200/345/206/240.kif +2 -2
  49. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/233/233/346/256/265/347/253/257/347/216/211.kif +3 -3
  50. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/233/233/350/247/222/347/237/242/345/200/211.kif +1 -1
  51. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/234/237/345/261/205/347/237/242/345/200/211.kif +1 -1
  52. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/235/212/344/270/273/347/276/216/346/277/203.kif +1 -1
  53. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/244/247/345/261/261/347/276/216/346/277/203.kif +1 -1
  54. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/244/247/351/232/205/345/233/262/343/201/204.kif +1 -1
  55. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/244/251/351/207/216/347/237/242/345/200/211.kif +1 -1
  56. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/257/214/345/243/253/350/246/213/347/237/242/345/200/211.kif +2 -1
  57. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/261/205/351/243/233/350/273/212/347/251/264/347/206/212.kif +1 -1
  58. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/261/205/351/243/233/350/273/212/351/207/221/345/206/240.kif +4 -2
  59. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/261/205/351/243/233/350/273/212/351/207/221/347/204/241/345/217/214.kif +1 -1
  60. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/261/205/351/243/233/350/273/212/351/207/221/347/276/216/346/277/203.kif +1 -1
  61. data/lib/bioshogi/analysis//345/233/262/343/201/204//345/261/205/351/243/233/350/273/212/351/212/200/345/206/240.kif +1 -1
  62. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/202/252/345/275/242/347/237/242/345/200/211.kif +1 -1
  63. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/214/257/343/202/212/351/243/233/350/273/212/343/203/223/343/203/203/343/202/2604.kif +4 -1
  64. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/214/257/343/202/212/351/243/233/350/273/212/343/203/237/343/203/254/343/203/213/343/202/242/343/203/240.kif +5 -2
  65. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/214/257/343/202/212/351/243/233/350/273/212/344/270/262/343/202/253/343/203/204/345/233/262/343/201/204.kif +1 -1
  66. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/214/257/343/202/212/351/243/233/350/273/212/345/233/233/346/236/232/347/276/216/346/277/203.kif +2 -2
  67. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/214/257/343/202/212/351/243/233/350/273/212/347/253/257/347/216/211/351/212/200/345/206/240.kif +1 -1
  68. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/226/207/351/216/256/345/233/262/343/201/204.kif +1 -1
  69. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/234/250/346/235/221/347/276/216/346/277/203.kif +1 -1
  70. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/241/220/345/261/261/346/265/201/344/270/255/345/216/237/345/233/262/343/201/204.kif +1 -1
  71. data/lib/bioshogi/analysis//345/233/262/343/201/204//346/265/201/343/202/214/347/237/242/345/200/211.kif +1 -1
  72. data/lib/bioshogi/analysis//345/233/262/343/201/204//347/204/241/350/262/254/344/273/273/347/237/242/345/200/211.kif +1 -1
  73. data/lib/bioshogi/analysis//345/233/262/343/201/204//347/211/207/343/203/204/343/203/216/351/212/200/345/233/262/343/201/204.kif +1 -1
  74. data/lib/bioshogi/analysis//345/233/262/343/201/204//347/211/207/347/251/264/347/206/212.kif +1 -1
  75. data/lib/bioshogi/analysis//345/233/262/343/201/204//347/237/242/345/200/211/347/251/264/347/206/212.kif +1 -1
  76. data/lib/bioshogi/analysis//345/233/262/343/201/204//347/256/261/345/205/245/343/202/212/345/250/230.kif +2 -2
  77. data/lib/bioshogi/analysis//345/233/262/343/201/204//347/267/217/347/237/242/345/200/211.kif +1 -1
  78. data/lib/bioshogi/analysis//345/233/262/343/201/204//347/276/216/346/277/203/347/206/212/345/233/262/343/201/204.kif +1 -1
  79. data/lib/bioshogi/analysis//345/233/262/343/201/204//350/217/212/346/260/264/347/237/242/345/200/211.kif +1 -1
  80. data/lib/bioshogi/analysis//345/233/262/343/201/204//350/217/261/347/237/242/345/200/211.kif +1 -1
  81. data/lib/bioshogi/analysis//345/233/262/343/201/204//350/243/217/343/202/242/343/203/222/343/203/253/345/233/262/343/201/204.kif +1 -1
  82. data/lib/bioshogi/analysis//345/233/262/343/201/204//350/243/276/345/233/272/343/202/201.kif +1 -1
  83. data/lib/bioshogi/analysis//345/233/262/343/201/204//350/247/222/347/237/242/345/200/211.kif +1 -1
  84. data/lib/bioshogi/analysis//345/233/262/343/201/204//350/261/206/350/205/220/347/237/242/345/200/211.kif +1 -1
  85. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/200/243/347/233/237/347/276/216/346/277/203.kif +1 -1
  86. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/207/221/345/244/232/344/274/235.kif +1 -1
  87. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/207/221/347/204/241/345/217/214.kif +3 -2
  88. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/207/221/347/233/276/345/233/262/343/201/204.kif +1 -1
  89. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/207/221/347/276/216/346/277/203.kif +2 -0
  90. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/212/200/345/206/240/347/251/264/347/206/212.kif +1 -1
  91. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/212/200/347/253/213/343/201/241/347/237/242/345/200/211.kif +2 -2
  92. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/212/200/347/276/216/346/277/203.kif +2 -2
  93. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/233/242/343/202/214/351/207/221/347/204/241/345/217/214.kif +1 -1
  94. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/253/230/347/237/242/345/200/211.kif +1 -1
  95. data/lib/bioshogi/analysis//345/233/262/343/201/204//351/253/230/347/276/216/346/277/203/345/233/262/343/201/204.kif +1 -1
  96. data/lib/bioshogi/analysis//346/210/246/346/263/225/2/346/211/213/347/233/256/342/226/2633/343/203/213/351/243/233/346/210/246/346/263/225.kif +2 -1
  97. data/lib/bioshogi/analysis//346/210/246/346/263/225/2/346/211/213/347/233/256/342/226/2633/344/272/214/351/212/200/343/202/267/343/202/271/343/203/206/343/203/240.kif +1 -1
  98. data/lib/bioshogi/analysis//346/210/246/346/263/225/2/346/211/213/347/233/256/342/226/2636/344/272/214/351/212/200/346/210/246/346/263/225.kif +1 -1
  99. data/lib/bioshogi/analysis//346/210/246/346/263/225/5/346/211/213/347/210/206/345/274/276.kif +5 -1
  100. data/lib/bioshogi/analysis//346/210/246/346/263/225/5/347/255/213/344/275/215/345/217/226/343/202/212.kif +2 -2
  101. data/lib/bioshogi/analysis//346/210/246/346/263/225/6/347/255/213/344/275/215/345/217/226/343/202/212.kif +1 -1
  102. data/lib/bioshogi/analysis//346/210/246/346/263/225/U/343/202/277/343/203/274/343/203/263/351/243/233/350/273/212.kif +5 -2
  103. data/lib/bioshogi/analysis//346/210/246/346/263/225//342/226/2625/344/270/203/351/207/221/346/210/246/346/263/225.kif +5 -3
  104. data/lib/bioshogi/analysis//346/210/246/346/263/225//342/226/2625/344/272/224/351/276/215/344/270/255/351/243/233/350/273/212.kif +1 -1
  105. data/lib/bioshogi/analysis//346/210/246/346/263/225//342/226/2633/344/270/211/346/241/202/346/210/246/346/263/225.kif +2 -2
  106. data/lib/bioshogi/analysis//346/210/246/346/263/225//342/226/2633/344/270/211/350/247/222/345/236/213/347/251/272/344/270/255/346/210/246/346/263/225.kif +3 -2
  107. data/lib/bioshogi/analysis//346/210/246/346/263/225//342/226/2633/344/270/211/351/207/221/345/236/213/346/227/251/347/271/260/343/202/212/351/212/200.kif +1 -1
  108. data/lib/bioshogi/analysis//346/210/246/346/263/225//342/226/2633/344/270/211/351/243/233/346/210/246/346/263/225.kif +3 -2
  109. data/lib/bioshogi/analysis//346/210/246/346/263/225//342/226/2634/344/272/224/350/247/222/346/210/246/346/263/225.kif +1 -1
  110. data/lib/bioshogi/analysis//346/210/246/346/263/225//342/226/2637/344/272/214/351/243/233/344/272/234/346/200/245/346/210/246.kif +1 -1
  111. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/201/206/343/201/243/343/201/213/343/202/212/344/270/211/351/226/223/351/243/233/350/273/212.kif +1 -1
  112. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/201/215/357/275/215/343/201/215/357/275/215/351/207/221.kif +1 -1
  113. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/201/257/343/201/217/345/274/217/345/233/233/351/226/223/351/243/233/350/273/212.kif +4 -2
  114. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/201/270/343/201/252/343/201/241/343/202/207/343/201/223/346/200/245/346/210/246.kif +1 -1
  115. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/204/343/201/260/343/203/234/343/203/274/343/202/272/346/265/201.kif +3 -0
  116. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/250/343/203/253/343/203/242/346/200/245/346/210/246.kif +6 -2
  117. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/253/343/203/213/343/202/253/343/203/213/351/207/221.kif +1 -1
  118. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/253/343/203/213/343/202/253/343/203/213/351/212/200.kif +1 -1
  119. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/263/343/203/274/343/203/244/343/203/263/346/265/201/344/270/211/351/226/223/351/243/233/350/273/212.kif +6 -3
  120. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/264/343/202/255/343/202/262/343/203/263/344/270/255/351/243/233/350/273/212.kif +3 -2
  121. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/264/343/203/252/343/202/264/343/203/252/351/207/221.kif +1 -1
  122. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/264/343/203/252/343/203/251/343/201/256/345/217/263/346/211/213.kif +1 -1
  123. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/264/343/203/252/351/201/225/343/201/204/350/247/222.kif +27 -0
  124. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/267/343/203/247/343/203/274/343/203/200/343/203/263/343/202/252/343/203/252/343/202/270/343/203/212/343/203/253.kif +3 -1
  125. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/202/267/343/203/247/343/203/274/343/203/200/343/203/263/343/202/267/343/202/271/343/203/206/343/203/240.kif +3 -1
  126. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/204/343/203/216/351/212/200/344/270/255/351/243/233/350/273/212.kif +4 -3
  127. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/204/343/203/216/351/212/200/345/236/213/345/217/263/347/216/211.kif +6 -2
  128. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/210/343/203/236/343/203/233/343/203/274/343/202/257.kif +1 -1
  129. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/215/343/202/263/345/274/217/343/202/277/343/203/206/346/255/251/345/217/226/343/202/212.kif +1 -1
  130. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/216/343/203/274/343/203/236/343/203/253/344/270/211/351/226/223/351/243/233/350/273/212.kif +1 -1
  131. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/216/343/203/274/343/203/236/343/203/253/345/233/233/351/226/223/351/243/233/350/273/212.kif +1 -1
  132. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/222/343/203/251/343/203/241/346/210/246/346/263/225.kif +1 -1
  133. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/235/343/203/263/343/203/235/343/203/263/346/241/202.kif +2 -2
  134. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/241/343/202/244/343/203/211/343/202/267/343/202/271/343/203/206/343/203/240.kif +1 -1
  135. data/lib/bioshogi/analysis//346/210/246/346/263/225//343/203/242/343/203/216/343/203/254/343/203/274/343/203/253/345/220/221/343/201/213/343/201/204/351/243/233/350/273/212.kif +5 -3
  136. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/200/346/211/213/346/220/215/350/247/222/346/217/233/343/202/217/343/202/212.kif +2 -1
  137. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/200/347/233/264/347/267/232/347/251/264/347/206/212.kif +6 -3
  138. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/200/351/226/223/351/243/233/350/273/212.kif +1 -1
  139. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/211/346/256/265/345/217/263/347/216/211.kif +3 -2
  140. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/211/351/226/223/351/243/233/350/273/212.kif +1 -1
  141. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/213/347/224/272/346/265/201/344/270/211/351/226/223/351/243/233/350/273/212.kif +1 -1
  142. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/255/345/216/237/346/265/201/346/200/245/346/210/246/347/237/242/345/200/211.kif +2 -1
  143. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/255/345/216/237/346/265/201/347/233/270/346/216/233/343/201/213/343/202/212.kif +2 -1
  144. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/255/345/216/237/351/243/233/350/273/212.kif +2 -2
  145. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/255/345/272/247/351/243/233/350/273/212.kif +2 -2
  146. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/255/351/243/233/350/273/212/343/203/237/343/203/254/343/203/213/343/202/242/343/203/240.kif +1 -1
  147. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/255/351/243/233/350/273/212/345/267/246/347/251/264/347/206/212.kif +3 -2
  148. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/270/270/345/261/261/343/203/257/343/202/257/343/203/201/343/203/263.kif +1 -1
  149. data/lib/bioshogi/analysis//346/210/246/346/263/225//344/271/235/351/226/223/351/243/233/350/273/212.kif +1 -1
  150. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/210/235/346/211/213/342/226/2627/345/205/253/351/212/200/346/210/246/346/263/225.kif +1 -1
  151. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/212/240/350/227/244/346/265/201/350/242/226/351/243/233/350/273/212.kif +1 -1
  152. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/213/207/346/260/227/346/265/201.kif +1 -1
  153. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/215/207/347/224/260/345/274/217/347/237/263/347/224/260/346/265/201.kif +1 -1
  154. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/217/263/345/233/233/351/226/223/351/243/233/350/273/212/345/267/246/347/276/216/346/277/203.kif +4 -1
  155. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/217/263/345/233/233/351/226/223/351/243/233/350/273/212/346/200/245/346/210/246.kif +1 -1
  156. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/217/263/347/216/211.kif +1 -1
  157. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/220/214/345/236/213/347/237/242/345/200/211.kif +2 -2
  158. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/233/233/346/211/213/350/247/222.kif +1 -1
  159. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/234/260/344/270/213/351/211/204/351/243/233/350/273/212.kif +3 -2
  160. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/241/232/347/224/260/343/202/271/343/203/232/343/202/267/343/203/243/343/203/253.kif +2 -1
  161. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/244/251/345/275/246/346/265/201/342/226/2626/345/205/255/350/247/222.kif +1 -1
  162. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/244/251/345/275/246/346/265/201/345/220/221/343/201/213/343/201/204/351/243/233/350/273/212.kif +1 -1
  163. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/254/211/351/207/216/346/265/201.kif +4 -1
  164. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/256/244/345/262/241/343/202/267/343/202/271/343/203/206/343/203/240.kif +1 -2
  165. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/257/276/347/237/242/345/200/211/346/200/245/346/210/246/346/243/222/351/212/200.kif +6 -3
  166. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/261/213/346/225/267/346/265/201/344/272/214/346/236/232/351/212/200.kif +2 -3
  167. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/261/213/346/225/267/346/265/201/344/272/214/346/236/232/351/212/200/346/243/222/351/212/200/345/236/213.kif +2 -0
  168. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/261/261/347/224/260/345/256/232/350/267/241.kif +1 -1
  169. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/267/246/347/276/216/346/277/203/346/200/245/346/210/246.kif +3 -2
  170. data/lib/bioshogi/analysis//346/210/246/346/263/225//345/271/273/346/203/263/345/233/233/351/226/223/351/243/233/350/273/212.kif +1 -1
  171. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/210/270/{351/203/250 → 350/276/272}/346/265/2014/342/206/2223/346/210/246/346/263/225.kif +3 -3
  172. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/226/260/345/254/211/351/207/216/346/265/201.kif +2 -0
  173. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/226/260/346/235/221/347/224/260/343/202/267/343/202/271/343/203/206/343/203/240.kif +3 -1
  174. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/226/260/347/261/263/351/225/267/347/216/211.kif +1 -1
  175. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/226/260/351/254/274/346/256/272/343/201/227.kif +1 -1
  176. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/234/250/346/235/221/345/256/232/350/267/241.kif +5 -3
  177. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/235/221/347/224/260/343/202/267/343/202/271/343/203/206/343/203/240.kif +1 -1
  178. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/241/220/345/261/261/346/265/201/343/202/277/343/203/206/346/255/251/346/243/222/351/212/200.kif +2 -1
  179. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/243/222/347/216/211.kif +1 -1
  180. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/243/222/351/207/221.kif +1 -1
  181. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/243/256/344/270/213/343/202/267/343/202/271/343/203/206/343/203/240.kif +2 -2
  182. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/245/240/346/234/254/345/274/217/347/237/263/347/224/260/346/265/201.kif +2 -2
  183. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/250/252/346/255/251/345/217/226/343/202/212.kif +2 -2
  184. data/lib/bioshogi/analysis//346/210/246/346/263/225//346/270/205/351/207/216/346/265/201/345/262/220/351/230/234/346/210/246/346/263/225.kif +1 -1
  185. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/216/211/351/240/255/344/275/215/345/217/226/343/202/212.kif +1 -1
  186. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/216/211/351/240/255/351/212/200.kif +3 -1
  187. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/233/270/346/250/252/346/255/251/345/217/226/343/202/212.kif +2 -6
  188. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/233/270/347/255/213/351/201/225/343/201/204/350/247/222.kif +2 -0
  189. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/234/237/351/203/250/346/265/201.kif +5 -3
  190. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/237/242/345/200/211/342/226/2623/344/270/203/351/212/200/346/210/246/346/263/225.kif +3 -1
  191. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/237/242/345/200/211/344/270/255/351/243/233/350/273/212.kif +1 -1
  192. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/250/262/345/272/255/346/210/246/346/263/225.kif +1 -1
  193. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/251/264/350/247/222/345/220/221/343/201/213/343/201/204/351/243/233/350/273/212.kif +1 -1
  194. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/251/264/350/247/222/346/210/246/346/263/225.kif +4 -3
  195. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/253/213/347/237/263/346/265/201/345/233/233/351/226/223/351/243/233/350/273/212.kif +1 -1
  196. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/253/271/351/203/250/343/202/271/343/203/232/343/202/267/343/203/243/343/203/253.kif +1 -1
  197. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/255/213/351/201/225/343/201/204/350/247/222.kif +3 -2
  198. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/261/263/351/225/267/346/265/201/346/200/245/346/210/246/347/237/242/345/200/211.kif +8 -2
  199. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/263/270/350/260/267/346/265/201/345/217/263/347/216/211.kif +2 -1
  200. data/lib/bioshogi/analysis//346/210/246/346/263/225//347/276/275/347/224/237/345/274/217/350/242/226/351/243/233/350/273/212.kif +3 -1
  201. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/200/200/351/276/215/343/201/262/343/201/255/343/202/212/351/243/233/350/273/212.kif +1 -1
  202. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/200/200/351/276/215/345/233/233/351/226/223/351/243/233/350/273/212.kif +1 -1
  203. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/204/207/343/202/267/343/202/271/343/203/206/343/203/240.kif +1 -1
  204. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/205/260/346/216/233/343/201/221/351/212/200.kif +1 -2
  205. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/213/261/343/201/241/343/202/203/343/202/223/346/265/201/344/270/255/351/243/233/350/273/212.kif +5 -4
  206. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/213/261/346/230/245/346/265/201/343/201/213/343/201/276/343/201/204/343/201/237/343/201/241/346/210/246/346/263/225.kif +5 -3
  207. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/213/261/346/230/245/346/265/201/343/202/253/343/203/241/343/203/254/343/202/252/343/203/263.kif +4 -2
  208. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/217/205/344/272/225/346/265/201/344/270/211/351/226/223/351/243/233/350/273/212.kif +1 -1
  209. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/217/234/343/200/205/346/262/263/346/265/201/342/226/2634/345/233/233/350/247/222.kif +1 -1
  210. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/217/234/343/200/205/346/262/263/346/265/201/345/220/221/343/201/213/343/201/204/351/243/233/350/273/212.kif +2 -1
  211. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/242/226/351/243/233/350/273/212.kif +7 -2
  212. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/243/217/343/202/242/343/203/222/343/203/253/346/210/246/346/263/225.kif +1 -1
  213. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/247/222/346/217/233/343/202/217/343/202/212/345/217/263/347/216/211.kif +5 -2
  214. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/247/222/346/217/233/343/202/217/343/202/212/346/227/251/347/271/260/343/202/212/351/212/200.kif +4 -1
  215. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/247/222/346/217/233/343/202/217/343/202/212/346/243/222/351/212/200.kif +2 -0
  216. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/247/222/346/217/233/343/202/217/343/202/212/350/205/260/346/216/233/343/201/221/351/212/200.kif +1 -1
  217. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/247/222/346/217/233/343/202/217/343/202/212/350/205/260/346/216/233/343/201/221/351/212/200/346/227/247/345/236/213.kif +2 -2
  218. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/247/222/351/240/255/346/255/251/346/210/246/346/263/225.kif +1 -1
  219. data/lib/bioshogi/analysis//346/210/246/346/263/225//350/266/205/346/200/245/346/210/246.kif +1 -1
  220. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/200/206/346/243/222/351/212/200.kif +1 -1
  221. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/201/240/345/261/261/346/265/201.kif +3 -2
  222. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/203/275/346/210/220/346/265/201/342/226/2633/344/270/200/351/207/221.kif +24 -11
  223. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/207/221/346/262/242/346/265/201.kif +1 -1
  224. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/207/221/347/204/241/345/217/214/346/200/245/346/210/246.kif +1 -1
  225. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/207/221/351/212/200/346/251/213.kif +2 -2
  226. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/212/200/351/233/262/351/233/200.kif +1 -1
  227. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/214/206/345/210/200/346/210/246/346/263/225.kif +54 -0
  228. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/230/252/347/224/260/346/265/2012/346/211/213/347/233/256/342/226/2639/345/233/233/346/255/251.kif +1 -1
  229. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/230/252/347/224/260/346/265/201/345/220/221/343/201/213/343/201/204/351/243/233/350/273/212.kif +3 -2
  230. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/230/277/344/271/205/346/264/245/346/265/201/346/200/245/346/210/246/347/237/242/345/200/211.kif +5 -2
  231. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/233/200/345/210/272/343/201/227.kif +2 -2
  232. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/233/201/346/234/250/345/217/263/347/216/211.kif +3 -2
  233. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/242/250/350/273/212.kif +1 -1
  234. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/253/230/347/224/260/346/265/201/345/267/246/347/216/211.kif +1 -1
  235. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/254/274/345/205/255/346/265/201/343/201/251/343/201/243/343/201/213/343/202/223/351/243/233/350/273/212.kif +54 -0
  236. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/254/274/346/256/272/343/201/227/345/220/221/343/201/213/343/201/204/351/243/233/350/273/212.kif +1 -1
  237. data/lib/bioshogi/analysis//346/210/246/346/263/225//351/255/224/347/225/214/345/233/233/351/226/223/351/243/233/350/273/212.kif +1 -1
  238. data/lib/bioshogi/analysis//346/211/213/347/255/213/2/346/256/265/343/203/255/343/202/261/343/203/203/343/203/210.kif +1 -1
  239. data/lib/bioshogi/analysis//346/211/213/347/255/213//343/201/237/343/201/237/343/201/215/343/201/256/346/255/251.kif +27 -9
  240. data/lib/bioshogi/analysis//346/211/213/347/255/213//343/203/221/343/203/263/343/203/204/343/202/222/350/204/261/343/201/220.kif +11 -11
  241. data/lib/bioshogi/analysis//346/211/213/347/255/213//347/253/257/347/216/211/343/201/253/343/201/257/347/253/257/346/255/251.kif +12 -14
  242. data/lib/bioshogi/analysis//346/211/213/347/255/213//351/200/243/346/211/223/343/201/256/346/255/251.kif +2 -1
  243. data/lib/bioshogi/analysis//346/211/213/347/255/213//351/201/240/350/246/213/343/201/256/350/247/222.kif +16 -6
  244. data/lib/bioshogi/analysis.rb +4 -0
  245. data/lib/bioshogi/board/csa_formatter.rb +2 -2
  246. data/lib/bioshogi/board/kakinoki_formatter.rb +5 -5
  247. data/lib/bioshogi/board/reader_methods.rb +8 -4
  248. data/lib/bioshogi/board_parser/kakinoki_board_parser.rb +2 -2
  249. data/lib/bioshogi/container/checkmate_yomiage.rb +1 -1
  250. data/lib/bioshogi/dimension/base.rb +49 -10
  251. data/lib/bioshogi/dimension/column.rb +131 -0
  252. data/lib/bioshogi/dimension/module_methods.rb +19 -20
  253. data/lib/bioshogi/dimension/row.rb +128 -0
  254. data/lib/bioshogi/formatter/sugatayaki_validator.rb +1 -1
  255. data/lib/bioshogi/hand/drop.rb +1 -1
  256. data/lib/bioshogi/hand/move.rb +6 -6
  257. data/lib/bioshogi/input_adapter/ki2_adapter.rb +10 -10
  258. data/lib/bioshogi/input_adapter/shared_validation.rb +1 -1
  259. data/lib/bioshogi/location.rb +22 -2
  260. data/lib/bioshogi/official_formatter.rb +37 -37
  261. data/lib/bioshogi/order_info.rb +5 -3
  262. data/lib/bioshogi/piece/piece_vector.rb +16 -10
  263. data/lib/bioshogi/piece.rb +2 -2
  264. data/lib/bioshogi/place.rb +155 -62
  265. data/lib/bioshogi/player/soldier_methods.rb +2 -2
  266. data/lib/bioshogi/screen_image/core_methods.rb +2 -2
  267. data/lib/bioshogi/screen_image/pentagon.rb +2 -2
  268. data/lib/bioshogi/screen_image/soldier_methods.rb +1 -1
  269. data/lib/bioshogi/screen_image/stand.rb +5 -5
  270. data/lib/bioshogi/soldier/technique_matcher_methods.rb +51 -0
  271. data/lib/bioshogi/soldier.rb +14 -79
  272. data/lib/bioshogi/soldier_walker.rb +1 -1
  273. data/lib/bioshogi/turn_info.rb +2 -2
  274. data/lib/bioshogi/v/preset_vectors.rb +129 -0
  275. data/lib/bioshogi/v.rb +4 -2
  276. data/lib/bioshogi/version.rb +1 -1
  277. data/lib/bioshogi.rb +2 -0
  278. data//347/275/256/343/201/215/346/217/233/343/201/210/346/216/250/345/245/250.txt +1 -1
  279. metadata +14 -7
  280. data/lib/bioshogi/analysis/technique_matcher_info.rb +0 -810
  281. data/lib/bioshogi/dimension/place_x.rb +0 -27
  282. data/lib/bioshogi/dimension/place_y.rb +0 -57
@@ -0,0 +1,51 @@
1
+ module Bioshogi
2
+ class Soldier
3
+ # 手筋判定用
4
+ concern :TechniqueMatcherMethods do
5
+ Place::DELEGATE_METHODS.each do |name|
6
+ define_method(name) do |*args, **options|
7
+ place.public_send(name, location, *args, **options)
8
+ end
9
+ end
10
+
11
+ ################################################################################
12
+
13
+ # 前に一直線に進めるタイプか?
14
+ def boar_mode?
15
+ (piece.key == :lance && normal?) || piece.key == :rook
16
+ end
17
+
18
+ ################################################################################
19
+
20
+ # 駒の重さ(=価値) 常にプラス
21
+ def abs_weight
22
+ piece.any_weight(promoted)
23
+ end
24
+
25
+ # 駒の重さ(=価値)。先手視点。後手ならマイナスになる
26
+ def relative_weight
27
+ abs_weight * location.sign_dir
28
+ end
29
+
30
+ # 敵への駒の圧力(終盤度)
31
+ def pressure_level(area = 4)
32
+ case
33
+ when top_spaces < area
34
+ if promoted
35
+ piece.promoted_attack_level
36
+ else
37
+ piece.attack_level
38
+ end
39
+ when bottom_spaces < area
40
+ if promoted
41
+ -piece.promoted_defense_level
42
+ else
43
+ -piece.defense_level
44
+ end
45
+ else
46
+ 0
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8; compile-command: "bundle execute rspec ../../spec/soldier_spec.rb" -*-
2
1
  # frozen-string-literal: true
3
2
 
4
3
  module Bioshogi
@@ -56,6 +55,7 @@ module Bioshogi
56
55
  end
57
56
 
58
57
  include SimpleModel
58
+ include TechniqueMatcherMethods
59
59
 
60
60
  attr_accessor :piece
61
61
  attr_accessor :promoted
@@ -73,6 +73,10 @@ module Bioshogi
73
73
  Assertion.assert { place }
74
74
  end
75
75
 
76
+ def normal?
77
+ !promoted
78
+ end
79
+
76
80
  def attributes
77
81
  { piece: piece, promoted: promoted, place: place, location: location }
78
82
  end
@@ -95,15 +99,18 @@ module Bioshogi
95
99
  attributes.hash
96
100
  end
97
101
 
102
+ # 180度回転
98
103
  def flip
99
104
  self.class.create(piece: piece, promoted: promoted, place: place.flip, location: location.flip)
100
105
  end
101
106
 
107
+ # 左右反転
102
108
  def flop
103
109
  self.class.create(piece: piece, promoted: promoted, place: place.flop, location: location)
104
110
  end
105
111
 
106
- def flip_if_white
112
+ # ▲視点に統一
113
+ def white_then_flip
107
114
  if location.key == :white
108
115
  flip
109
116
  else
@@ -130,8 +137,8 @@ module Bioshogi
130
137
  ################################################################################ Utility
131
138
 
132
139
  # 自分を移動元の状態と考えて to に移動したとき成れるか?
133
- def next_promotable?(to)
134
- piece.promotable? && !promoted && (place.promotable?(location) || to.promotable?(location))
140
+ def tsugini_nareru_on?(to)
141
+ piece.promotable? && !promoted && (place.opp_side?(location) || to.opp_side?(location))
135
142
  end
136
143
 
137
144
  # 移動可能な座標を取得
@@ -142,7 +149,7 @@ module Bioshogi
142
149
  # 二歩?
143
150
  def collision_pawn(board)
144
151
  if piece.key == :pawn && !promoted
145
- board.vertical_pieces(place.x).find do |e|
152
+ board.vertical_soldiers(place.column).find do |e|
146
153
  e.piece.key == :pawn && !e.promoted && e.location == location
147
154
  end
148
155
  end
@@ -155,90 +162,18 @@ module Bioshogi
155
162
 
156
163
  # 自分を▲側に補正したときの座標
157
164
  def normalized_place
158
- place.flip_if_white(location)
165
+ place.white_then_flip(location)
159
166
  end
160
167
 
161
168
  # 入玉宣言時の得点
162
169
  def ek_score
163
- if place.promotable?(location)
170
+ if place.opp_side?(location)
164
171
  piece.ek_score
165
172
  else
166
173
  0
167
174
  end
168
175
  end
169
176
 
170
- # 手筋判定用
171
- concerning :TechniqueMatcherMethods do
172
- # 自分の側の一番下を0としてどれだけ前に進んでいるかを返す
173
- def bottom_spaces
174
- Dimension::PlaceY.dimension - 1 - top_spaces
175
- end
176
-
177
- # 自分の側の一番上を0としてあとどれだけで突き当たるかの値
178
- def top_spaces
179
- place.flip_if_white(location).y.value
180
- end
181
-
182
- # 「左右の壁からどれだけ離れているかの値」の小さい方(先後関係なし)
183
- def smaller_one_of_side_spaces
184
- [place.x.value, __distance_from_right].min
185
- end
186
-
187
- # 左右の壁に近い方に進むときの符号(先手視点なので先後関係なし)
188
- def sign_to_goto_closer_side
189
- if place.x.value > __distance_from_right
190
- 1
191
- else
192
- -1
193
- end
194
- end
195
-
196
- # 先手から見て右からの距離
197
- def __distance_from_right
198
- Dimension::PlaceX.dimension - 1 - place.x.value
199
- end
200
-
201
- # センターにいる?
202
- def center_place?
203
- place.x.value == Dimension::PlaceX.dimension / 2
204
- end
205
-
206
- # 自玉の位置にいる?
207
- def initial_place?
208
- center_place? && bottom_spaces == 0
209
- end
210
-
211
- # 駒の重さ(=価値) 常にプラス
212
- def abs_weight
213
- piece.any_weight(promoted)
214
- end
215
-
216
- # 駒の重さ(=価値)。先手視点。後手ならマイナスになる
217
- def relative_weight
218
- abs_weight * location.value_sign
219
- end
220
-
221
- # 敵への駒の圧力(終盤度)
222
- def pressure_level(area = 4)
223
- case
224
- when top_spaces < area
225
- if promoted
226
- piece.promoted_attack_level
227
- else
228
- piece.attack_level
229
- end
230
- when bottom_spaces < area
231
- if promoted
232
- -piece.promoted_defense_level
233
- else
234
- -piece.defense_level
235
- end
236
- else
237
- 0
238
- end
239
- end
240
- end
241
-
242
177
  ################################################################################ Formatter
243
178
 
244
179
  def to_s
@@ -78,7 +78,7 @@ module Bioshogi
78
78
  soldier = origin_soldier.merge(place: place)
79
79
 
80
80
  # 成れるなら成る
81
- if origin_soldier.next_promotable?(soldier.place)
81
+ if origin_soldier.tsugini_nareru_on?(soldier.place)
82
82
  move_hand = Hand::Move.create(soldier: soldier.merge(promoted: true), origin_soldier: origin_soldier, captured_soldier: captured_soldier)
83
83
  success = piece_store_core(container, move_hand, yielder, options)
84
84
  if success
@@ -46,9 +46,9 @@ module Bioshogi
46
46
  # for Analyzer
47
47
  def order_key
48
48
  if display_turn.even?
49
- :sente
49
+ :order_first
50
50
  else
51
- :gote
51
+ :order_second
52
52
  end
53
53
  end
54
54
 
@@ -0,0 +1,129 @@
1
+ module Bioshogi
2
+ class V
3
+ module PresetVectors
4
+ ################################################################################
5
+
6
+ def around_vectors
7
+ @around_vectors ||= [up, right, down, left]
8
+ end
9
+
10
+ def left_right_vectors
11
+ @left_right_vectors ||= [left, right]
12
+ end
13
+
14
+ def wariuchi_vectors
15
+ @wariuchi_vectors ||= [down_left, down_right]
16
+ end
17
+
18
+ def ikkenryu_vectors
19
+ @ikkenryu_vectors ||= [left_left, right_right, up_up, down_down]
20
+ end
21
+
22
+ def keima_vectors
23
+ @keima_methods ||= [up_up_left, up_up_right]
24
+ end
25
+
26
+ def ginbasami_verctors
27
+ @ginbasami_verctors ||= [[right, right_right, right_right_up], [left, left_left, left_left_up]]
28
+ end
29
+
30
+ def tsugikei_vectors
31
+ @tsugikei_methods ||= [down_down_right, down_down_left]
32
+ end
33
+
34
+ def tasuki_vectors
35
+ @tasuki_vectors ||= [[up_left, down_right], [up_right, down_left]]
36
+ end
37
+
38
+ def bishop_naname_mae_vectors
39
+ @bishop_naname_mae_vectors ||= [up_left, up_right]
40
+ end
41
+
42
+ ################################################################################ 上下左右
43
+
44
+ def right
45
+ @right ||= self[1, 0]
46
+ end
47
+
48
+ def down
49
+ @down ||= self[0, 1]
50
+ end
51
+
52
+ def up
53
+ @up ||= -down
54
+ end
55
+
56
+ def left
57
+ @left ||= -right
58
+ end
59
+
60
+ ################################################################################ 斜め
61
+
62
+ def up_left
63
+ @up_left ||= up + left
64
+ end
65
+
66
+ def up_right
67
+ @up_right ||= up + right
68
+ end
69
+
70
+ def down_left
71
+ @down_left ||= down + left
72
+ end
73
+
74
+ def down_right
75
+ @down_right ||= down + right
76
+ end
77
+
78
+ ################################################################################ 一間竜
79
+
80
+ def right_right
81
+ @right_right ||= right + right
82
+ end
83
+
84
+ def left_left
85
+ @left_left ||= left + left
86
+ end
87
+
88
+ def up_up
89
+ @up_up ||= up + up
90
+ end
91
+
92
+ def down_down
93
+ @down_down ||= down + down
94
+ end
95
+
96
+ ################################################################################ 桂馬
97
+
98
+ def up_up_right
99
+ @up_up_right ||= up + up + right
100
+ end
101
+
102
+ def up_up_left
103
+ @up_up_left ||= up + up + left
104
+ end
105
+
106
+ ################################################################################ 継ぎ桂チェック用
107
+
108
+ def down_down_right
109
+ @down_down_right ||= down + down + right
110
+ end
111
+
112
+ def down_down_left
113
+ @down_down_left ||= down + down + left
114
+ end
115
+
116
+ ################################################################################ 銀ばさみチェック用
117
+
118
+ def right_right_up
119
+ @right_right_up ||= right + right + up
120
+ end
121
+
122
+ def left_left_up
123
+ @left_left_up ||= left + left + up
124
+ end
125
+
126
+ ################################################################################
127
+ end
128
+ end
129
+ end
data/lib/bioshogi/v.rb CHANGED
@@ -1,12 +1,14 @@
1
1
  module Bioshogi
2
2
  class V
3
+ extend PresetVectors
4
+
3
5
  class << self
4
6
  def one
5
- self[1, 1]
7
+ @one ||= self[1, 1]
6
8
  end
7
9
 
8
10
  def half
9
- self[0.5, 0.5]
11
+ @half ||= self[0.5, 0.5]
10
12
  end
11
13
 
12
14
  def [](...)
@@ -1,3 +1,3 @@
1
1
  module Bioshogi
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
data/lib/bioshogi.rb CHANGED
@@ -37,6 +37,8 @@ module Bioshogi
37
37
  mattr_accessor(:run_counts) { Hash.new(0) }
38
38
 
39
39
  SFEN1 = "position sfen l+n1g1g1n+l/1ks2r1+r1/1pppp1bpp/p2+b+sp+p2/9/P1P1+SP1PP/1+P+BPP1P2/1BK1GR1+R1/+L+NSG3NL b R2B3G4S5N11L99Pr2b3g4s5n11l99p 1"
40
+
41
+ ANALYSIS_VERSION = 3
40
42
  end
41
43
 
42
44
  if true
@@ -32,7 +32,7 @@
32
32
  ~/src/bioshogi/lib/bioshogi/analysis/戦法/一直線穴熊.kif:8:棋戦詳細:第21期棋王戦予選決勝
33
33
  ~/src/bioshogi/lib/bioshogi/analysis/戦法/対振り持久戦.kif:9:棋戦詳細:第63期順位戦C級2組1回戦
34
34
  ~/src/bioshogi/lib/bioshogi/analysis/戦法/矢倉▲3七銀戦法.kif:8:棋戦詳細:第1回銀河戦本戦Bブロック22回戦
35
- ~/src/bioshogi/lib/bioshogi/analysis/戦法/戸部流4→3戦法.kif:9:棋戦詳細:第63期順位戦C級2組1回戦
35
+ ~/src/bioshogi/lib/bioshogi/analysis/戦法/戸辺流4→3戦法.kif:9:棋戦詳細:第63期順位戦C級2組1回戦
36
36
  ~/src/bioshogi/lib/bioshogi/analysis/戦法/角交換振り飛車.kif:6:棋戦詳細:名人八七段勝抜戦
37
37
  ~/src/bioshogi/lib/bioshogi/analysis/戦法/遠山流.kif:8:棋戦詳細:アマプロ勝ち抜き戦(近代将棋1995年4月号)
38
38
  ~/src/bioshogi/lib/bioshogi/analysis/戦法/四手角.kif:9:棋戦詳細:第18期棋王戦本戦3回戦
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bioshogi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Ikeda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-30 00:00:00.000000000 Z
11
+ date: 2024-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -297,6 +297,7 @@ executables:
297
297
  extensions: []
298
298
  extra_rdoc_files: []
299
299
  files:
300
+ - ".dumbjump"
300
301
  - ".gitignore"
301
302
  - ".ruby-version"
302
303
  - ".travis.yml"
@@ -331,9 +332,11 @@ files:
331
332
  - lib/bioshogi/ai/evaluator/opening_basic_table.rb
332
333
  - lib/bioshogi/ai/player_brain_mod.rb
333
334
  - lib/bioshogi/ai/versus.rb
335
+ - lib/bioshogi/analysis.rb
334
336
  - lib/bioshogi/analysis/analyzer.rb
335
337
  - lib/bioshogi/analysis/analyzer_mod.rb
336
338
  - lib/bioshogi/analysis/attack_info.rb
339
+ - lib/bioshogi/analysis/basic_accessor.rb
337
340
  - lib/bioshogi/analysis/board_piller_methods.rb
338
341
  - lib/bioshogi/analysis/chaos_info.rb
339
342
  - lib/bioshogi/analysis/defense_info.rb
@@ -353,10 +356,9 @@ files:
353
356
  - lib/bioshogi/analysis/tactic_info.rb
354
357
  - lib/bioshogi/analysis/tactic_stat.rb
355
358
  - lib/bioshogi/analysis/tactic_validator.rb
356
- - lib/bioshogi/analysis/tech_accessor.rb
357
359
  - lib/bioshogi/analysis/technique_info.rb
358
360
  - lib/bioshogi/analysis/technique_matcher_helper.rb
359
- - lib/bioshogi/analysis/technique_matcher_info.rb
361
+ - lib/bioshogi/analysis/technique_verify_info.rb
360
362
  - lib/bioshogi/analysis/備考/ロケット.kif
361
363
  - lib/bioshogi/analysis/備考/入玉.kif
362
364
  - lib/bioshogi/analysis/備考/名人に定跡なし.kif
@@ -552,6 +554,7 @@ files:
552
554
  - lib/bioshogi/analysis/戦法/ゴキゲン中飛車.kif
553
555
  - lib/bioshogi/analysis/戦法/ゴリゴリ金.kif
554
556
  - lib/bioshogi/analysis/戦法/ゴリラの右手.kif
557
+ - lib/bioshogi/analysis/戦法/ゴリ違い角.kif
555
558
  - lib/bioshogi/analysis/戦法/ショーダンオリジナル.kif
556
559
  - lib/bioshogi/analysis/戦法/ショーダンシステム.kif
557
560
  - lib/bioshogi/analysis/戦法/タランチュラ戦法.kif
@@ -626,7 +629,7 @@ files:
626
629
  - lib/bioshogi/analysis/戦法/左美濃急戦.kif
627
630
  - lib/bioshogi/analysis/戦法/幻想四間飛車.kif
628
631
  - lib/bioshogi/analysis/戦法/必笑ひっかけ戦法.kif
629
- - lib/bioshogi/analysis/戦法/戸部流4→3戦法.kif
632
+ - lib/bioshogi/analysis/戦法/戸辺流4→3戦法.kif
630
633
  - lib/bioshogi/analysis/戦法/新ポンポン桂.kif
631
634
  - lib/bioshogi/analysis/戦法/新嬉野流.kif
632
635
  - lib/bioshogi/analysis/戦法/新村田システム.kif
@@ -710,6 +713,7 @@ files:
710
713
  - lib/bioshogi/analysis/戦法/金銀橋.kif
711
714
  - lib/bioshogi/analysis/戦法/鈴木流早石田.kif
712
715
  - lib/bioshogi/analysis/戦法/銀雲雀.kif
716
+ - lib/bioshogi/analysis/戦法/錆刀戦法.kif
713
717
  - lib/bioshogi/analysis/戦法/鎖鎌銀.kif
714
718
  - lib/bioshogi/analysis/戦法/間宮久夢流.kif
715
719
  - lib/bioshogi/analysis/戦法/阪田流2手目△9四歩.kif
@@ -724,6 +728,7 @@ files:
724
728
  - lib/bioshogi/analysis/戦法/飯島流引き角戦法.kif
725
729
  - lib/bioshogi/analysis/戦法/飯島流相掛かり引き角戦法.kif
726
730
  - lib/bioshogi/analysis/戦法/高田流左玉.kif
731
+ - lib/bioshogi/analysis/戦法/鬼六流どっかん飛車.kif
727
732
  - lib/bioshogi/analysis/戦法/鬼殺し.kif
728
733
  - lib/bioshogi/analysis/戦法/鬼殺し向かい飛車.kif
729
734
  - lib/bioshogi/analysis/戦法/魔界四間飛車.kif
@@ -1077,10 +1082,10 @@ files:
1077
1082
  - lib/bioshogi/dimension.rb
1078
1083
  - lib/bioshogi/dimension/base.rb
1079
1084
  - lib/bioshogi/dimension/char_info.rb
1085
+ - lib/bioshogi/dimension/column.rb
1080
1086
  - lib/bioshogi/dimension/dimension_info.rb
1081
1087
  - lib/bioshogi/dimension/module_methods.rb
1082
- - lib/bioshogi/dimension/place_x.rb
1083
- - lib/bioshogi/dimension/place_y.rb
1088
+ - lib/bioshogi/dimension/row.rb
1084
1089
  - lib/bioshogi/errors.rb
1085
1090
  - lib/bioshogi/extreme_validator.rb
1086
1091
  - lib/bioshogi/formatter/akf_builder.rb
@@ -1187,6 +1192,7 @@ files:
1187
1192
  - lib/bioshogi/simulator.rb
1188
1193
  - lib/bioshogi/single_clock.rb
1189
1194
  - lib/bioshogi/soldier.rb
1195
+ - lib/bioshogi/soldier/technique_matcher_methods.rb
1190
1196
  - lib/bioshogi/soldier_box.rb
1191
1197
  - lib/bioshogi/soldier_walker.rb
1192
1198
  - lib/bioshogi/source.rb
@@ -1207,6 +1213,7 @@ files:
1207
1213
  - lib/bioshogi/turn_info.rb
1208
1214
  - lib/bioshogi/v.rb
1209
1215
  - lib/bioshogi/v/once_vector.rb
1216
+ - lib/bioshogi/v/preset_vectors.rb
1210
1217
  - lib/bioshogi/v/repeat_vector.rb
1211
1218
  - lib/bioshogi/vector_constants.rb
1212
1219
  - lib/bioshogi/version.rb