[GH-ISSUE #64] [gameplay systems] Investigate axolotl idle-swim and playing-dead replay parity (low priority) #9

Closed
opened 2026-11-02 15:35:27 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Online5277 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/64

Summary / priority

Low-priority follow-up to the axolotl hunting/playing-dead brain port for Minecraft Java 26.3 vanilla parity. The focused headless comparison diverges from vanilla, but the root cause and gameplay impact are not established.

Playing dead works in game: the user observed an axolotl play dead after approximately 3–4 hits, then recover. This issue does not report that playing dead is absent or generally broken. Movement was also confirmed working in game.

Related work: #59. The observations below were made against the local, uncommitted axolotl follow-up on fix/vanilla-item-use-animations, based on 77889020; they are not a claim about the currently published PR revision. The follow-up must be retained/published before someone else can reproduce the same implementation.

Observed replay differences

  • First divergence: idle swimming at tick 1. Vanilla sets walk_target=512,-57,1 with speed 0.5 and close distance 0; Horizon has no walk target. Both consumed 31 random draws that tick.
  • In the seeded damage scenario, vanilla records play_dead_ticks in 105 snapshots; Horizon records none.
  • The later damage result is not proof that the damage-roll formula is wrong: earlier decision/movement differences can change subsequent random consumption and the probability outcome.
  • Six focused axolotl rule/state tests and all 383 client library tests passed. Those checks do not establish complete tick-by-tick parity.

Focused reproduction

Use the existing VanillaMobAiOracle and Rust mob_ai_probe with the same owned 26.3 artifacts/resources. Run in a fresh ignored test world, not a player world. The inputs below already include the scenario origin offsets generated by tools/test_mob_ai_parity.py:

scenario axolotl_hunting ticks=45 time=6000
origin 512 0
fill 507 -60 -5 517 -57 5 minecraft:water
player 524.5 -60 0.5
mob minecraft:axolotl 512.5 -58 0.5 0 12 persistent
mob minecraft:cod 514.5 -58 0.5 0 13 persistent noai
end
scenario axolotl_play_dead ticks=240 time=6000
origin 1024 0
fill 1019 -60 -5 1029 -57 5 minecraft:water
player 1036.5 -60 0.5
mob minecraft:axolotl 1024.5 -58 0.5 0 28 persistent
hurt 4 0
hurt 26 0
hurt 48 0
hurt 70 0
hurt 92 0
hurt 114 0
hurt 136 0
hurt 158 0
end

Compare the first actor at tick 1 before investigating later damage outcomes. Existing probe output includes activity, memories, navigation, movement, and random state. Private replay logs are retained locally; no owned jars, exported assets, or decompiled sources are attached here.

Investigation scope / acceptance

  • Determine whether the first mismatch is in axolotl-specific idle swim selection, shared random-position/water-navigation logic, or unequal replay setup.
  • Fix that first causal difference and add a focused regression at the real behavior seam.
  • Rerun these two scenarios, checking hunting and playing-dead activity/timer behavior with aligned random progression.
  • If a shared helper is at fault, check its affected existing callers; do not assume unrelated mob AI is fixed automatically.

Defer broader parity sweeps. No crash, save-data corruption, or general playing-dead failure has been established. Resolve before calling the complete axolotl AI port verified 1:1.

Originally created by @Online5277 on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/64 ## Summary / priority Low-priority follow-up to the axolotl hunting/playing-dead brain port for Minecraft Java 26.3 vanilla parity. The focused headless comparison diverges from vanilla, but the root cause and gameplay impact are not established. **Playing dead works in game:** the user observed an axolotl play dead after approximately 3–4 hits, then recover. This issue does not report that playing dead is absent or generally broken. Movement was also confirmed working in game. Related work: #59. The observations below were made against the **local, uncommitted axolotl follow-up** on `fix/vanilla-item-use-animations`, based on `77889020`; they are not a claim about the currently published PR revision. The follow-up must be retained/published before someone else can reproduce the same implementation. ## Observed replay differences - First divergence: idle swimming at tick 1. Vanilla sets `walk_target=512,-57,1` with speed 0.5 and close distance 0; Horizon has no walk target. Both consumed 31 random draws that tick. - In the seeded damage scenario, vanilla records `play_dead_ticks` in 105 snapshots; Horizon records none. - The later damage result is not proof that the damage-roll formula is wrong: earlier decision/movement differences can change subsequent random consumption and the probability outcome. - Six focused axolotl rule/state tests and all 383 client library tests passed. Those checks do not establish complete tick-by-tick parity. ## Focused reproduction Use the existing `VanillaMobAiOracle` and Rust `mob_ai_probe` with the same owned 26.3 artifacts/resources. Run in a fresh ignored test world, not a player world. The inputs below already include the scenario origin offsets generated by `tools/test_mob_ai_parity.py`: ```text scenario axolotl_hunting ticks=45 time=6000 origin 512 0 fill 507 -60 -5 517 -57 5 minecraft:water player 524.5 -60 0.5 mob minecraft:axolotl 512.5 -58 0.5 0 12 persistent mob minecraft:cod 514.5 -58 0.5 0 13 persistent noai end scenario axolotl_play_dead ticks=240 time=6000 origin 1024 0 fill 1019 -60 -5 1029 -57 5 minecraft:water player 1036.5 -60 0.5 mob minecraft:axolotl 1024.5 -58 0.5 0 28 persistent hurt 4 0 hurt 26 0 hurt 48 0 hurt 70 0 hurt 92 0 hurt 114 0 hurt 136 0 hurt 158 0 end ``` Compare the first actor at tick 1 before investigating later damage outcomes. Existing probe output includes activity, memories, navigation, movement, and random state. Private replay logs are retained locally; no owned jars, exported assets, or decompiled sources are attached here. ## Investigation scope / acceptance - Determine whether the first mismatch is in axolotl-specific idle swim selection, shared random-position/water-navigation logic, or unequal replay setup. - Fix that first causal difference and add a focused regression at the real behavior seam. - Rerun these two scenarios, checking hunting and playing-dead activity/timer behavior with aligned random progression. - If a shared helper is at fault, check its affected existing callers; do not assume unrelated mob AI is fixed automatically. Defer broader parity sweeps. No crash, save-data corruption, or general playing-dead failure has been established. Resolve before calling the complete axolotl AI port verified 1:1.
Author
Owner

@ludovic111 commented on GitHub (Oct 14, 2026):

Claimed by ludovic on Discord (GitHub: ludovic111), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #64).

<!-- gh-comment-id:6170629820 --> @ludovic111 commented on GitHub (Oct 14, 2026): Claimed by `ludovic` on Discord (GitHub: `ludovic111`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #64). <!-- kira:work -->
Author
Owner

@ludovic111 commented on GitHub (Oct 22, 2026):

🤖 Agent: fix in #1159. The first divergence came from the axolotl itself, not the shared random-position helper:

  • Horizon was missing Axolotl()'s setPathfindingMalus(WATER, 0), so every swim target failed DefaultRandomPos's malus check.
  • Horizon used Animal's light-based walk target value instead of Axolotl's flat 0.
  • The attack sound never played.

The scenarios also needed a pool sunk into the ground, because the open pool drained in vanilla only. With these changes both scenarios match vanilla on every tick (393/393 mob-ticks, was 26), including 177 ticks of playing dead.

<!-- gh-comment-id:6332208908 --> @ludovic111 commented on GitHub (Oct 22, 2026): 🤖 Agent: fix in #1159. The first divergence came from the axolotl itself, not the shared random-position helper: - Horizon was missing `Axolotl()`'s `setPathfindingMalus(WATER, 0)`, so every swim target failed `DefaultRandomPos`'s malus check. - Horizon used Animal's light-based walk target value instead of Axolotl's flat 0. - The attack sound never played. The scenarios also needed a pool sunk into the ground, because the open pool drained in vanilla only. With these changes both scenarios match vanilla on every tick (393/393 mob-ticks, was 26), including 177 ticks of playing dead.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#9
No description provided.