Skip to content

Fix position challenges to use the selected move-tree position - #85

Merged
Perlkonig merged 2 commits into
AbstractPlay:developfrom
samtcifihi:challenge-from-focused-position-2026-10-18
Oct 18, 2026
Merged

Perlkonig merged 2 commits into
AbstractPlay:developfrom
samtcifihi:challenge-from-focused-position-2026-10-18

Conversation

@samtcifihi

Copy link
Copy Markdown
Contributor

From the attached .json position, after clicking "Challenge from position", I get the following preview, which doesn't appear to be intentional:

image image

The fix Chappy proposed is to get the position that is currently focused rather than the end of the main line. This seems like what was probably intended.

{
  "format": "abstractplay-playground",
  "version": 1,
  "metaGame": "arimaa",
  "state": "{\"game\":\"arimaa\",\"numplayers\":2,\"variants\":[\"free\"],\"gameover\":false,\"winner\":[],\"stack\":[{\"_version\":\"20251223\",\"_results\":[],\"_timestamp\":\"2026-10-02T01:50:13.830Z\",\"currplayer\":1,\"board\":{\"dataType\":\"Map\",\"value\":[]},\"hands\":[[\"E\",\"M\",\"H\",\"D\",\"C\",\"R\"],[\"E\",\"M\",\"H\",\"D\",\"C\",\"R\"]]},{\"_version\":\"20251223\",\"_results\":[{\"type\":\"place\",\"what\":\"R\",\"where\":\"e1\"},{\"type\":\"place\",\"what\":\"E\",\"where\":\"e2\"},{\"type\":\"place\",\"what\":\"M\",\"where\":\"d2\"},{\"type\":\"place\",\"what\":\"H\",\"where\":\"c2\"},{\"type\":\"place\",\"what\":\"H\",\"where\":\"b2\"},{\"type\":\"place\",\"what\":\"D\",\"where\":\"a2\"},{\"type\":\"place\",\"what\":\"D\",\"where\":\"a1\"},{\"type\":\"place\",\"what\":\"C\",\"where\":\"c1\"},{\"type\":\"place\",\"what\":\"C\",\"where\":\"b1\"}],\"_timestamp\":\"2026-10-02T01:50:45.729Z\",\"currplayer\":2,\"lastmove\":\"Re1, Ee2, Md2, Hc2, Hb2, Da2, Da1, Cc1, Cb1\",\"board\":{\"dataType\":\"Map\",\"value\":[[\"e1\",[\"R\",1]],[\"e2\",[\"E\",1]],[\"d2\",[\"M\",1]],[\"c2\",[\"H\",1]],[\"b2\",[\"H\",1]],[\"a2\",[\"D\",1]],[\"a1\",[\"D\",1]],[\"c1\",[\"C\",1]],[\"b1\",[\"C\",1]]]},\"hands\":[[\"E\",\"M\",\"H\",\"D\",\"C\",\"R\"],[\"E\",\"M\",\"H\",\"D\",\"C\",\"R\"]]},{\"_version\":\"20251223\",\"_results\":[{\"type\":\"place\",\"what\":\"R\",\"where\":\"a8\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"b8\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"c8\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"d8\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"e8\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"f8\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"g8\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"h8\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"h7\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"g7\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"f7\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"e7\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"d7\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"c7\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"b7\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"a7\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"a6\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"b6\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"c6\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"d6\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"e6\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"f6\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"g6\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"h6\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"h5\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"g5\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"f5\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"e5\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"d5\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"c5\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"b5\"},{\"type\":\"place\",\"what\":\"R\",\"where\":\"a5\"}],\"_timestamp\":\"2026-10-02T01:51:54.041Z\",\"currplayer\":1,\"lastmove\":\"ra8, rb8, rc8, rd8, re8, rf8, rg8, rh8, rh7, rg7, rf7, re7, rd7, rc7, rb7, ra7, ra6, rb6, rc6, rd6, re6, rf6, rg6, rh6, rh5, rg5, rf5, re5, rd5, rc5, rb5, ra5\",\"board\":{\"dataType\":\"Map\",\"value\":[[\"e1\",[\"R\",1]],[\"e2\",[\"E\",1]],[\"d2\",[\"M\",1]],[\"c2\",[\"H\",1]],[\"b2\",[\"H\",1]],[\"a2\",[\"D\",1]],[\"a1\",[\"D\",1]],[\"c1\",[\"C\",1]],[\"b1\",[\"C\",1]],[\"a8\",[\"R\",2]],[\"b8\",[\"R\",2]],[\"c8\",[\"R\",2]],[\"d8\",[\"R\",2]],[\"e8\",[\"R\",2]],[\"f8\",[\"R\",2]],[\"g8\",[\"R\",2]],[\"h8\",[\"R\",2]],[\"h7\",[\"R\",2]],[\"g7\",[\"R\",2]],[\"f7\",[\"R\",2]],[\"e7\",[\"R\",2]],[\"d7\",[\"R\",2]],[\"c7\",[\"R\",2]],[\"b7\",[\"R\",2]],[\"a7\",[\"R\",2]],[\"a6\",[\"R\",2]],[\"b6\",[\"R\",2]],[\"c6\",[\"R\",2]],[\"d6\",[\"R\",2]],[\"e6\",[\"R\",2]],[\"f6\",[\"R\",2]],[\"g6\",[\"R\",2]],[\"h6\",[\"R\",2]],[\"h5\",[\"R\",2]],[\"g5\",[\"R\",2]],[\"f5\",[\"R\",2]],[\"e5\",[\"R\",2]],[\"d5\",[\"R\",2]],[\"c5\",[\"R\",2]],[\"b5\",[\"R\",2]],[\"a5\",[\"R\",2]]]}}]}",
  "variants": [
    "free"
  ],
  "playerCount": 2,
  "focus": {
    "moveNumber": 0,
    "exPath": [
      6,
      0
    ]
  },
  "exploration": [
    [
      {
        "move": "Re1, Ee2, Md2, Hc2, Db2, Ca2",
        "children": [
          {
            "move": "ra8, rb8, rc8, rd8, re8, rf8, rg8, rh8, rh7, rg7, rf7, re7, rd7, rc7, rb7, ra7, ra6, rb6, rd6, rc6, re6, rf6, rh6, rg6, rh5, rg5, rf5, re5, rd5, rc5, rb5, ra5",
            "children": []
          }
        ]
      },
      {
        "move": "Rd1, Ce2, Cf2, Cc2",
        "children": []
      },
      {
        "move": "Re1, Ca2, Cb2, Cc2, Cd2, Cf2, Cg2, Ch2",
        "children": []
      },
      {
        "move": "Db2, Dc2, Df2, Dg2, Rh2, Rh1, Rg1, Rf1, Re1, Re2, Rd2, Rd1, Rc1, Rb1, Ra1, Ra2",
        "children": []
      },
      {
        "move": "Db2, Dg2, Rh2, Rh1, Rg1, Rf1, Rf2, Re2, Re1, Rd1, Rd2, Rc2, Rc1, Rb1, Ra1, Ra2",
        "children": [
          {
            "move": "ra8, ca6, ch6, cg6, ce6, cd6, cb6, ra7, rb7, rb8, rc8, rc7, rd7, rd8, re8, re7, rf7, rf8, rg8, rh8, rh7, rg7, cf6, cc6",
            "children": []
          }
        ]
      },
      {
        "move": "Ee2, Ra1, Rc2, Rc1, Rd1, Rf2, Rf1, Rg1, Rh1, Db2, Rb1, Rh2, Cd2, Dg2, Ce1, Ra2",
        "children": [
          {
            "move": "ed7, me7, hg7, hb7, rh7, rh8, rg8, rf8, rc8, rb8, ra8, ra7, dd8, de8, cf7, cc7",
            "children": []
          }
        ]
      },
      {
        "move": "Ee2, Hb2, Dg2, Cd2, Ra2, Ra1, Rb1, Rc1, Rc2, Rd1, Re1, Rf1, Rf2, Rh1, Rg1, Rh2",
        "children": [
          {
            "move": "ed7, me7, hg7, hb7, dd8, de8, cf7, cc7, ra7, ra8, rb8, rc8, rf8, rg8, rh8, rh7",
            "children": []
          }
        ]
      }
    ],
    null,
    null
  ],
  "moveAnnotations": null
}

@Perlkonig
Perlkonig merged commit b804fb4 into AbstractPlay:develop Oct 18, 2026
1 check passed
@samtcifihi
samtcifihi deleted the challenge-from-focused-position-2026-10-18 branch October 18, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants