The hard part wasn't the plumbing, it was the perception. The model gets only what a human sees on the screen — no reading enemy positions out of the map, no seeing through walls. Concretely, each observation carries: a fan of raycast wall distances across the field of view (the "depth" of the rendered image); the things actually on-screen and in line of sight, ordered left to right; an ASCII automap showing only the walls it has already discovered; and two hints — door_ahead (a closed door in view) and blocked (your last move made no progress).
We started with a coarse 7-ray depth fan, and the agent kept walking into things — doorways and wall edges fell between the rays and were simply invisible. Bumping it to 51 rays across the field of view made the world legible: a ray suddenly much longer than its neighbours is an opening.

The bug that taught us the most: the agent kept swapping left and right. It turned out our reported bearings were sign-inverted relative to the docs, and the facing angle used a different convention than the map. Once we made positive = right everywhere (things, walls, doors) and turned the heading into a compass aligned with the north-up automap, it stopped headbutting walls and started navigating. door_ahead got the same care — it points at the centre of a door, and reappears as "press use again" when a door has re-shut, instead of being mistaken for a solid wall. blocked was reworked too, projecting movement onto the facing axis so that sliding sideways along a wall still counts as "not getting where I'm pointing."
Andrea Ricci
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.