ThreeJs and Reinforcement Learning in 3D

Published: February 2, 2025 at 3:09 PM UTC+0200
Last edited: 12 March, 2025 at 11:53 AM UTC+0200
Author: Richard Djarbeng

I built a simple 3D game in November 2024 mostly for fun. The objective was to minimize the time taken for a player to destroy all the pillars. Then I got a brilliant (in hindsight not so brilliant) idea 💡. Why not add a Reinforcement Learning (RL) agent to play the game I made? I’d always wanted to do some hands-on RL. Sounded like a great idea with the best of intentions, what could possibly have gone wrong.

If you wanted to view the current version of the game find it here

Project Overview

This project featured a robot and an ‘alien’ character navigating through a custom-designed 3D environment.

Reinforcement Learning Agent

Here’s an earlier screen recording I made below

Features

Technologies Used

Getting Started

If you were interested in continuing the development or experimenting with the RL agent, here’s what you needed:

  1. Basic Knowledge: Familiarity with ReactJS and 3D modeling would have been beneficial.
  2. Environment Setup: Ensure you had Node.js installed for ReactJS development. Or you could have used an online IDE like stackblitz (honestly that was the same environment I used to code this)
  3. The link to the repository was here

Follow the Development

For updates and progress on this project, follow me on X (formerly Twitter).

Acknowledgements

The initial template for the project was made with bolt.new.


Feel free to fork the repository, contribute, or reach out with suggestions or questions. Let’s bring this game to its full potential!