PTS.Biosphere2: AI-Powered Digital Twin Ecosystem

Inspiration

The idea of building a digital twin of Biosphere 2 was inspired by the urgent need to model, understand, and restore ecosystems — not just on Earth, but eventually on other planets. As humanity prepares for long-term space habitation, tools that simulate and monitor closed ecological systems are vital. We wanted to create an AI-powered, real-time decision-making assistant that could help scientists monitor crop health, navigate terrain intelligently, and interact with the system through natural language.

What it does?

PTS.Biosphere2 is an interactive AI-powered simulator that:

  1. Uses LLMs to reason about environmental conditions and take action
  2. Analyzes crop health visually and through sensor data
  3. Navigates terrain using A* pathfinding with obstacle awareness
  4. Provides an interactive chatbot interface for scientific feedback loops
  5. Visualizes terrain, rewards, path trails, and agent decisions in real time

How we built it:

We built the project in modular phases to allow rapid iteration:

1. Terrain & Navigation Module

  • Implemented RL in a 2D grid using Pygame
  • Added real-time visualization of movement and path trails

2. Crop Health & Sensor Feedback

  • Loaded Biosphere 2 sensor data from CSVs
  • Developed a crop evaluation algorithm based on environmental thresholds

3. LLM Reasoning & Feedback Loops

  • Integrated Ollama to run LLMs locally for fast decision-making
  • Built llm_reasoner.py to generate insights and control instructions

4. Web-Based Chatbot Interface

  • Created a web_chatbot.py module with a frontend for LLM interaction
  • Enabled users to ask questions and get intelligent feedback from the AI

5. System Integration & Main Loop

  • All modules communicate through main.py, which manages the simulation lifecycle
  • Logic links LLM actions to real-time crop/terrain simulation

Challenges we ran into:

  1. Module Integration: Ensuring real-time sync between LLM decisions and terrain/crop simulation was tricky.
  2. Latency: Balancing fast responses from the LLM while maintaining simulation speed.
  3. Sensor Data Parsing: Normalizing and using legacy CSV sensor data in meaningful ways.
  4. LLM Debugging: Ensuring that LLM outputs were accurate and actionable within the simulation context.

Accomplishments that we're proud of:

  1. Built a fully modular AI simulator from scratch in less than 48 hours
  2. Successfully integrated local LLMs, terrain simulation, and sensor data
  3. Developed an interactive chatbot UI for real-time decision feedback
  4. Implemented dynamic crop health evaluation using real-world Biosphere 2 data

What we learned:

  1. How to integrate local LLM reasoning into a real-time system
  2. Real-world application of RL in controlled environments
  3. How to process and visualize environmental data for AI agents
  4. The importance of modular design in hackathon-scale projects
  5. Hands-on experience building intelligent digital twins of ecosystems

What's next for PTS.Biosphere2:

  1. Add multi-agent simulation for swarm intelligence and ecosystem diversity
  2. Integrate real-time weather data APIs for more dynamic simulations
  3. Explore use cases for space habitat simulations and autonomous AI farming
  4. Improve LLM reasoning accuracy with reinforcement learning feedback
  5. Collaborate with scientists to validate crop models and expand features

Built With

Share this project:

Updates