[PR #4523] [MERGED] mob_ai: baby villagers play tag, checked tick for tick against vanilla #5674

Closed
opened 2026-11-03 05:14:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4523
Author: @xFedeT
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/kid-tag-run-off


📝 Commits (1)

  • 8373160 mob_ai: baby villagers play tag, checked tick for tick against vanilla

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 tools/test_mob_ai_parity.py (+6 -0)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Refs #3521 (row PlayTagWithOtherKids.isFriendChasingMe)

What

The row says a chased kid never runs off to a spot in the village. It is wrong: B::PlayTag in mobs/villager_brain.rs already ports PlayTagWithOtherKids.create, including the isFriendChasingMe branch (10 tries of LandRandomPos.getPos(me, 20, 8), kept if in a village, walk target speed 0.6, close 0).

I read the vanilla class first and compared it line by line with the Rust: random draw order (nextInt(10) before anything else), the "fewest chasers, 1 to 5" pick, the fallback to any friend, chaseKid memories and speeds. Logic is identical, so no code change.

Proof

New scenario villager_kids_tag in tools/test_mob_ai_parity.py: three baby villagers by day.

villager_kids_tag: all 401 ticks match
1/1 scenarios match entirely; 1203/1203 mob-ticks match before each mob's first divergence

The scenario really runs both branches in vanilla (checked in the oracle output): 682 ticks with a chase walk target (entity, speed 0.6, close 2 as the tracker reports it), 38 ticks with a flee walk target to a block position (close 0), and interaction_target set on the chaser. Rust matches all of them.

This is a test-only change, no gameplay diff, so there is no screenshot to show.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4523 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/kid-tag-run-off` --- ### 📝 Commits (1) - [`8373160`](https://github.com/horizon-rust/horizon/commit/8373160c359dd82a054698b23fa836a774800a80) mob_ai: baby villagers play tag, checked tick for tick against vanilla ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tools/test_mob_ai_parity.py` (+6 -0) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Refs #3521 (row `PlayTagWithOtherKids.isFriendChasingMe`) ## What The row says a chased kid never runs off to a spot in the village. It is wrong: `B::PlayTag` in `mobs/villager_brain.rs` already ports `PlayTagWithOtherKids.create`, including the `isFriendChasingMe` branch (10 tries of `LandRandomPos.getPos(me, 20, 8)`, kept if in a village, walk target speed 0.6, close 0). I read the vanilla class first and compared it line by line with the Rust: random draw order (`nextInt(10)` before anything else), the "fewest chasers, 1 to 5" pick, the fallback to any friend, `chaseKid` memories and speeds. Logic is identical, so no code change. ## Proof New scenario `villager_kids_tag` in `tools/test_mob_ai_parity.py`: three baby villagers by day. ``` villager_kids_tag: all 401 ticks match 1/1 scenarios match entirely; 1203/1203 mob-ticks match before each mob's first divergence ``` The scenario really runs both branches in vanilla (checked in the oracle output): 682 ticks with a chase walk target (entity, speed 0.6, close 2 as the tracker reports it), 38 ticks with a flee walk target to a block position (close 0), and `interaction_target` set on the chaser. Rust matches all of them. This is a test-only change, no gameplay diff, so there is no screenshot to show. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:14 +07:00
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#5674
No description provided.