SHARE
TWEET

Untitled

a guest Oct 13th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1 3 4
  2. 8 0 2
  3. 7 6 5
  4. 1, 1
  5. root board:
  6. **************
  7. 1 3 4
  8. 8 0 2
  9. 7 6 5
  10. manhattan = 0
  11. costFromRoot = 0
  12. hueristic = 11
  13. zero position = 1, 1
  14. **********
  15.  
  16. ******************
  17. whats in priority queue
  18. 1 3 4
  19. 8 0 2
  20. 7 6 5
  21.  
  22. end of priority queue
  23. **************
  24.  
  25. top should be
  26. 1 3 4
  27. 8 0 2
  28. 7 6 5
  29.  
  30. ^^^top^^^
  31. board with lowest hueristics
  32. **************
  33. 1 3 4
  34. 8 0 2
  35. 7 6 5
  36. manhattan = 0
  37. costFromRoot = 0
  38. hueristic = 11
  39. zero position = 1, 1
  40. **********
  41.  
  42. up move:
  43. **************
  44. 1 0 4
  45. 8 3 2
  46. 7 6 5
  47. manhattan = 14
  48. costFromRoot = 3
  49. hueristic = 17
  50. zero position = 0, 1
  51. **********
  52.  
  53. left move:
  54. **************
  55. 1 3 4
  56. 0 8 2
  57. 7 6 5
  58. manhattan = 19
  59. costFromRoot = 8
  60. hueristic = 27
  61. zero position = 1, 0
  62. **********
  63.  
  64. down move:
  65. **************
  66. 1 3 4
  67. 8 6 2
  68. 7 0 5
  69. manhattan = 17
  70. costFromRoot = 6
  71. hueristic = 23
  72. zero position = 2, 1
  73. **********
  74.  
  75. right move:
  76. **************
  77. 1 3 4
  78. 8 2 0
  79. 7 6 5
  80. manhattan = 9
  81. costFromRoot = 2
  82. hueristic = 11
  83. zero position = 1, 2
  84. **********
  85.  
  86. ******************
  87. whats in priority queue
  88. 1 3 4
  89. 8 2 0
  90. 7 6 5
  91.  
  92. 1 0 4
  93. 8 3 2
  94. 7 6 5
  95.  
  96. 1 3 4
  97. 8 6 2
  98. 7 0 5
  99.  
  100. 1 3 4
  101. 0 8 2
  102. 7 6 5
  103.  
  104. end of priority queue
  105. **************
  106.  
  107. top should be
  108. 1 3 4
  109. 8 2 0
  110. 7 6 5
  111.  
  112. ^^^top^^^
  113. board with lowest hueristics
  114. **************
  115. 1 3 4
  116. 8 2 0
  117. 7 6 5
  118. manhattan = 9
  119. costFromRoot = 2
  120. hueristic = 11
  121. zero position = 1, 2
  122. **********
  123.  
  124. up move:
  125. **************
  126. 1 3 0
  127. 8 2 4
  128. 7 6 5
  129. manhattan = 5
  130. costFromRoot = 6
  131. hueristic = 11
  132. zero position = 0, 2
  133. **********
  134.  
  135. down move:
  136. **************
  137. 1 3 4
  138. 8 2 5
  139. 7 6 0
  140. manhattan = 14
  141. costFromRoot = 7
  142. hueristic = 21
  143. zero position = 2, 2
  144. **********
  145.  
  146. ******************
  147. whats in priority queue
  148. 1 3 0
  149. 8 2 4
  150. 7 6 5
  151.  
  152. 1 0 4
  153. 8 3 2
  154. 7 6 5
  155.  
  156. 1 3 4
  157. 8 2 5
  158. 7 6 0
  159.  
  160. 1 3 4
  161. 8 6 2
  162. 7 0 5
  163.  
  164. 1 3 4
  165. 0 8 2
  166. 7 6 5
  167.  
  168. end of priority queue
  169. **************
  170.  
  171. top should be
  172. 1 3 0
  173. 8 2 4
  174. 7 6 5
  175.  
  176. ^^^top^^^
  177. board with lowest hueristics
  178. **************
  179. 1 3 0
  180. 8 2 4
  181. 7 6 5
  182. manhattan = 5
  183. costFromRoot = 6
  184. hueristic = 11
  185. zero position = 0, 2
  186. **********
  187.  
  188. left move:
  189. **************
  190. 1 0 3
  191. 8 2 4
  192. 7 6 5
  193. manhattan = 2
  194. costFromRoot = 9
  195. hueristic = 11
  196. zero position = 0, 1
  197. **********
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top