Creating a signal-denied, light-restricted simulation for autonomous drone training.
As seen in the Team Umbrella mission proposal (ISU MSS 2026), lava tubes are the "holy grail" of Martian exploration. They offer protection from radiation and meteorites, but they present a navigation nightmare.
Inside a lava tube, an agent is effectively isolated from the rest of the solar system. The thick basaltic ceilings act as a Faraday cage, creating a zone of near-total radio silence. Traditional positioning systems (like GPS on Earth or orbital relay tracking on Mars) are non-existent. Without line-of-sight to satellites, drones cannot rely on external corrections for their position.
This same challenge applies to Earth. Search and Rescue (SAR) drones inside collapsed buildings or deep cave systems cannot rely on GPS. They must navigate using pure Ego-Motion and tactile/range-based sensors like Lidar.
Terrestrial_Abyss_Agent.Window > Package Manager.ml-agents repository (setup Day 0).package.json file inside com.unity.ml-agents folder.We need a tunnel, not just a plane. We will use ProBuilder to model it quickly.
Tools > ProBuilder > ProBuilder Window.Cave_Segment_01.Go to your Project window (bottom).
RoughRock.DroneAgent.DroneAgent, add component Rigidbody.
CaveExplorerThis is the critical sensor for dark environments.
DroneAgent, add component Ray Perception Sensor 3D.Create a new C# script named CaveExplorerAgent.cs and paste this code.
using UnityEngine;
using Unity.MLAgents;
using Unity.MLAgents.Actuators;
using Unity.MLAgents.Sensors;
public class CaveExplorerAgent : Agent
{
Rigidbody rBody;
public float flySpeed = 10f;
public override void Initialize()
{
rBody = GetComponent();
}
public override void OnEpisodeBegin()
{
// Reset velocity
rBody.velocity = Vector3.zero;
rBody.angularVelocity = Vector3.zero;
// Reset position to start of tube
transform.localPosition = new Vector3(0, 0.5f, 0);
transform.localRotation = Quaternion.identity;
}
public override void OnActionReceived(ActionBuffers actions)
{
// Inputs from Neural Network
float moveForward = actions.ContinuousActions[0];
float yaw = actions.ContinuousActions[1];
// Apply Forces
Vector3 force = transform.forward * moveForward * flySpeed;
rBody.AddForce(force);
Vector3 rotation = transform.up * yaw * 100f;
rBody.AddTorque(rotation);
// Energy Penalty (existential cost)
AddReward(-0.001f);
}
// Manual Control for Testing
public override void Heuristic(in ActionBuffers actionsOut)
{
var continuousActionsOut = actionsOut.ContinuousActions;
continuousActionsOut[0] = Input.GetAxis("Vertical"); // W/S
continuousActionsOut[1] = Input.GetAxis("Horizontal"); // A/D
}
// Collision Logic
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.CompareTag("Wall"))
{
SetReward(-1.0f); // Big Penalty for crashing
EndEpisode();
Debug.Log("Crashed into Wall!");
}
}
}
1. Attach this script to your DroneAgent game object.
2. Press Play in Unity.
3. Use W/A/S/D keys. Does the drone move? Do you see red lines (rays) shooting out?
If YES: You have successfully built a sensor-equipped agent.