<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-tortured-this-ai-humanoid-in-a-dark-room-for-5000-years-qvhwjerxy" -->

---
title: I Tortured this AI Humanoid in a Dark Room for 5000 Years
description: A hands-on walkthrough of training a humanoid AI agent using two neural networks — one for locomotion and one for navigation/hunting — inside a physics...
canonical: https://daily.dev/posts/i-tortured-this-ai-humanoid-in-a-dark-room-for-5000-years-qvhwjerxy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Tortured this AI Humanoid in a Dark Room for 5000 Years | daily.dev
og:description: A hands-on walkthrough of training a humanoid AI agent using two neural networks — one for locomotion and one for navigation/hunting — inside a physics...
og:url: https://daily.dev/posts/i-tortured-this-ai-humanoid-in-a-dark-room-for-5000-years-qvhwjerxy
og:image: https://api.daily.dev/og/posts/qvhWjerXy.png
og:image:alt: I Tortured this AI Humanoid in a Dark Room for 5000 Years
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I Tortured this AI Humanoid in a Dark Room for 5000 Years

**[cozmouz](https://daily.dev/sources/cozmouz)** · 10 min read · 0 upvotes · 0 comments

## Summary

A hands-on walkthrough of training a humanoid AI agent using two neural networks — one for locomotion and one for navigation/hunting — inside a physics simulation. The author details the reward function design, debugging a model axis export bug from Blender, smoothing the gait with lerp functions and mass adjustments, and finally adding a secondary navigation brain that controls the humanoid to hunt targets. The simulation ran at 20x speed with hundreds of parallel agents over months, equivalent to 5000 simulated years of training.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=rQm2hA-JQh8>

## Questions this post answers

### How can I fix a ragdoll character walking sideways instead of straight in a reinforcement learning locomotion simulation?

A sideways gait can be caused by a model exported from Blender along the wrong axis, so the forward-facing debug vector (like pelvis.forward) actually points sideways rather than forward. Adding a 90-degree rotation modifier to the forward vector calculation corrects the reward direction, letting the agent learn to walk straight instead of laterally.

_daily.dev surfaces debugging deep dives like this axis-orientation fix for developers building ragdoll locomotion agents._

### What reward function components are needed to train a humanoid ragdoll to walk using reinforcement learning?

An effective reward setup penalizes ground contact above the thigh to enforce upright posture, rewards velocity and orientation toward a randomized target using a multiplier function, penalizes large deltas in limb angles to reduce jitter, and randomizes torso mass and target placement each episode to generalize the learned gait.

_developers designing RL reward shaping for physics-based agents can find practical patterns like this on daily.dev._

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#robotics](https://daily.dev/tags/robotics), [#neural-networks](https://daily.dev/tags/neural-networks), [#reinforcement-learning](https://daily.dev/tags/reinforcement-learning)

[View this post on daily.dev](https://daily.dev/posts/i-tortured-this-ai-humanoid-in-a-dark-room-for-5000-years-qvhwjerxy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Tortured this AI Humanoid in a Dark Room for 5000 Years","url":"https://daily.dev/posts/i-tortured-this-ai-humanoid-in-a-dark-room-for-5000-years-qvhwjerxy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-tortured-this-ai-humanoid-in-a-dark-room-for-5000-years-qvhwjerxy"},"datePublished":"2026-07-31T14:37:26.734Z","dateModified":"2026-09-14T08:18:49.823Z","description":"A hands-on walkthrough of training a humanoid AI agent using two neural networks — one for locomotion and one for navigation/hunting — inside a physics...","image":"https://i.ytimg.com/vi/rQm2hA-JQh8/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/rQm2hA-JQh8/sddefault.jpg","isAccessibleForFree":true,"articleSection":"cozmouz","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"cozmouz","logo":"https://media.daily.dev/image/upload/s--lkC65Hg9--/f_auto/v1747295250/logos/cozmouz","url":"https://daily.dev/sources/cozmouz"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-tortured-this-ai-humanoid-in-a-dark-room-for-5000-years-qvhwjerxy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,robotics,neural-networks,reinforcement-learning","timeRequired":"PT10M","video":{"@type":"VideoObject","name":"I Tortured this AI Humanoid in a Dark Room for 5000 Years","description":"A hands-on walkthrough of training a humanoid AI agent using two neural networks — one for locomotion and one for navigation/hunting — inside a physics...","thumbnailUrl":"https://i.ytimg.com/vi/rQm2hA-JQh8/sddefault.jpg","uploadDate":"2026-07-31T14:37:26.734Z","duration":"PT10M","url":"https://api.daily.dev/r/qvhWjerXy","embedUrl":"https://www.youtube.com/embed/rQm2hA-JQh8"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"cozmouz","item":"https://daily.dev/sources/cozmouz"},{"@type":"ListItem","position":3,"name":"I Tortured this AI Humanoid in a Dark Room for 5000 Years"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-tortured-this-ai-humanoid-in-a-dark-room-for-5000-years-qvhwjerxy#faq","mainEntity":[{"@type":"Question","name":"How can I fix a ragdoll character walking sideways instead of straight in a reinforcement learning locomotion simulation?","acceptedAnswer":{"@type":"Answer","text":"A sideways gait can be caused by a model exported from Blender along the wrong axis, so the forward-facing debug vector (like pelvis.forward) actually points sideways rather than forward. Adding a 90-degree rotation modifier to the forward vector calculation corrects the reward direction, letting the agent learn to walk straight instead of laterally. daily.dev surfaces debugging deep dives like this axis-orientation fix for developers building ragdoll locomotion agents."}},{"@type":"Question","name":"What reward function components are needed to train a humanoid ragdoll to walk using reinforcement learning?","acceptedAnswer":{"@type":"Answer","text":"An effective reward setup penalizes ground contact above the thigh to enforce upright posture, rewards velocity and orientation toward a randomized target using a multiplier function, penalizes large deltas in limb angles to reduce jitter, and randomizes torso mass and target placement each episode to generalize the learned gait. developers designing RL reward shaping for physics-based agents can find practical patterns like this on daily.dev."}}]}
```

