[PR #4568] [MERGED] Baby armadillos follow the nearest visible adult (AdultSensor, BabyFollowAdult 5..16) #5700

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

📋 Pull Request Information

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

Base: main ← Head: fix/armadillo-follow-adult


📝 Commits (1)

  • c8c0238 Baby armadillos follow the nearest visible adult (AdultSensor, BabyFollowAdult 5..16)

📊 Changes

2 files changed (+108 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/mobs/armadillo.rs (+107 -7)
📝 tools/port_map/game-010.tsv (+1 -1)

📄 Description

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

Refs #3521 (row AdultSensor.doTick)

What

The row says baby armadillos have no follow-the-adult behaviour. Partly wrong: the idle goals already had a FollowParent (the farm animals' goal), but vanilla's armadillo runs BabyFollowAdult.create(5..16, 1.25) on the NEAREST_VISIBLE_ADULT memory of AdultSensor, and the two differ:

FollowParent (was) AdultSensor + BabyFollowAdult (now)
Adult any adult of the kind in a 17x9x17 box the closest adult of the kind in sight
Range 3 to 16 blocks closer than 17 and not closer than 5
Walk until the path ends (reach 1) until within 4 (closeEnoughDist = min - 1), looking at the adult

I read AdultSensor.java and BabyFollowAdult.java first and ported them in order as the BabyFollowAdult goal in mobs/armadillo.rs (it runs only in the idle activity, as the other armadillo goals do).

Proof

Real game (horizon-ctl, scratch dirs): an adult armadillo and a baby 12 blocks apart on a stone platform. The baby walks towards the adult and stops about 4.4 blocks from it, and follows again when the adult strolls away (x of the baby, goals as horizon-ctl mobs shows them):

baby -1.3 ['BabyFollowAdult']   adult 10.5
baby  3.7 ['BabyFollowAdult']
baby  5.6 ['BabyFollowAdult']
baby  6.1 []                    (4.4 from the adult: stays)
...
baby  6.6 ['BabyFollowAdult']   adult 11.3 (strolled away)
baby  8.1 []

Start The baby has come close

Unit tests: a baby follows an adult 8 blocks away, does not as a ball, and does not when the adult is within 5 blocks. pr_ready --quick: fmt, clippy, 1085 horizon-client tests and 481 Python tests pass.

Notes

  • No tick-for-tick parity check: armadillos run on goals standing in for ArmadilloAi's brain, and the mob_ai probe has no armadillo brain.
  • "Walk target absent" is "navigation done"; the sensor's 20 tick scan is not kept (the nearest adult is looked up when the goal is tried).

🤖 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/4568 **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/armadillo-follow-adult` --- ### 📝 Commits (1) - [`c8c0238`](https://github.com/horizon-rust/horizon/commit/c8c02381b5f168b93987360d61690907819b9724) Baby armadillos follow the nearest visible adult (AdultSensor, BabyFollowAdult 5..16) ### 📊 Changes **2 files changed** (+108 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/armadillo.rs` (+107 -7) 📝 `tools/port_map/game-010.tsv` (+1 -1) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Refs #3521 (row `AdultSensor.doTick`) ## What The row says baby armadillos have no follow-the-adult behaviour. Partly wrong: the idle goals already had a `FollowParent` (the farm animals' goal), but vanilla's armadillo runs `BabyFollowAdult.create(5..16, 1.25)` on the `NEAREST_VISIBLE_ADULT` memory of `AdultSensor`, and the two differ: | | `FollowParent` (was) | `AdultSensor` + `BabyFollowAdult` (now) | |---|---|---| | Adult | any adult of the kind in a 17x9x17 box | the closest adult of the kind **in sight** | | Range | 3 to 16 blocks | closer than 17 and **not closer than 5** | | Walk | until the path ends (reach 1) | until within 4 (`closeEnoughDist` = min - 1), looking at the adult | I read `AdultSensor.java` and `BabyFollowAdult.java` first and ported them in order as the `BabyFollowAdult` goal in `mobs/armadillo.rs` (it runs only in the idle activity, as the other armadillo goals do). ## Proof Real game (`horizon-ctl`, scratch dirs): an adult armadillo and a baby 12 blocks apart on a stone platform. The baby walks towards the adult and stops about 4.4 blocks from it, and follows again when the adult strolls away (x of the baby, goals as `horizon-ctl mobs` shows them): ``` baby -1.3 ['BabyFollowAdult'] adult 10.5 baby 3.7 ['BabyFollowAdult'] baby 5.6 ['BabyFollowAdult'] baby 6.1 [] (4.4 from the adult: stays) ... baby 6.6 ['BabyFollowAdult'] adult 11.3 (strolled away) baby 8.1 [] ``` ![](https://raw.githubusercontent.com/xFedeT/horizon/pr-screenshots/armadillo-follow/armadillo-follow.gif) | Start | The baby has come close | |---|---| | ![](https://raw.githubusercontent.com/xFedeT/horizon/pr-screenshots/armadillo-follow/start.png) | ![](https://raw.githubusercontent.com/xFedeT/horizon/pr-screenshots/armadillo-follow/after.png) | Unit tests: a baby follows an adult 8 blocks away, does not as a ball, and does not when the adult is within 5 blocks. `pr_ready --quick`: fmt, clippy, 1085 `horizon-client` tests and 481 Python tests pass. ## Notes - No tick-for-tick parity check: armadillos run on goals standing in for `ArmadilloAi`'s brain, and the `mob_ai` probe has no armadillo brain. - "Walk target absent" is "navigation done"; the sensor's 20 tick scan is not kept (the nearest adult is looked up when the goal is tried). 🤖 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:25 +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#5700
No description provided.