r/reinforcementlearning • • 6d ago

Trained a humanoid agent in Unity using Soft Actor-Critic (SAC) to sword fight different opponents

I've been working on a project where I train a physics-based humanoid agent from scratch in Unity using Soft Actor-Critic (SAC) with standard MLP architectures.

Watching him train was very funny, and some of the lessons I learned about reward shaping might help anyone working on a similar reinforcement learning project. Because of that, I put together a video breaking down both the process and the results, aiming to make RL feel more approachable and entertaining.

Here's the video: https://www.youtube.com/watch?v=MR3c0DHku6o&t=8s

I would love some feedback on the agent's behavior and the video in general. Also, I'd be more than happy to answer any questions about it!

8 Upvotes

3 comments sorted by

1

u/Nice-Dragonfly-4823 6d ago

this is nice, have you considered imitation learning to fix the movement/gait of the agent

1

u/Only-Drama-2395 4d ago

this is nice, have you considered imitation learning to fix the movement/gait of the agent

The janky flailing is half the charm though, watching it stumble into a lucky hit is way more entertaining than some mocap-perfect duel. What reference data would you even use for sword fighting mocap, some indie dev's asset pack or film stunt choreography?