Home
Showcase(11)
Blog(16)
Lab(15)
YouTube
Publications
Loading project...
Montek KundanMontek Kundan
  • Home
  • Showcase(11)
  • Blog(16)
  • Lab(15)
XInstagramGitHubLinkedInYouTube

Build using basehub.com

Inspired by basement.studio

Montek 2026

XInstagramGitHubLinkedInYouTube

Montek 2026

Inspired by basement.studio

Go back to showcase
  • Title
    AI learns to Drive
  • Year
    2025
  • Type
    AI
  • Views
    0 views
  • Link
    www.youtube.com/watch?v=wGZkhN6iGqs&t=48s
AI learns to drive Cover Image

For fun i started learning about reinforcement learning, and started to experiment with Unity mlagents toolkit.

I initially ran into issues installing ML-Agents on my Mac Silicon M4, so I followed the guide by Jack McKew, which was incredibly helpful in getting my setup running.

At first, my car agent kept getting stuck, especially around the same region, and it would repeatedly collide with obstacles instead of finding alternative routes. To address this, I experimented with several strategies:

Obstacle Awareness:
Used a RayPerceptionSensorComponent3D with 20 rays over 180° for better obstacle detection, replacing manual raycasts for more reliable input.

Reward Shaping:
Gave rewards for reducing distance to the target, with a bonus for alignment toward the goal—guiding the agent to move efficiently.

Stuck Penalty:
Added a penalty if the agent made little progress over time, encouraging exploration instead of repeated collisions.

Sequential Rewards:
Designed 6 reward checkpoints before the final goal. Dying before reaching them triggered a penalty based on missed rewards, pushing the agent to fully complete the task.

By mixing these strategies, like only using few, and commenting out the code for others to see which was effective, I finally managed to tweak the system so the car would successfully navigate around obstacles and reach the goal consistently.

More Projects

    ChaichatAI in the Terminal

More Projects

    ChaichatAI in the Terminal