Skip to main content

Motivated Technology Stack

Overview

The Virtual Rodent project uses a technology stack selected to support real-time simulation, modular development, reproducible experiments, automated testing, version control, and future integration with machine learning tools.

The selected technologies are:

TechnologyPurpose
Godot 4Simulation engine and graphical interface
GDScriptSimulation and application logic
JSONExperiment configuration and presets
CSVTabular experiment data export
PythonFuture data analysis and machine learning integration
PyTorchPlanned machine learning integration
GitVersion control
GiteaRepository hosting and team collaboration
DocusaurusProject documentation
Cloudflare PagesPublic documentation hosting

Godot 4

Godot 4 is the primary framework used to develop the Virtual Rodent simulation.

Godot was selected because it provides a lightweight and flexible environment for building interactive simulations while supporting both graphical applications and headless execution. Its scene and node architecture also provides a suitable foundation for separating the simulation interface from the underlying simulation logic.

Godot supports the project's requirements for:

  • Real-time simulation
  • 2D environments
  • User interaction
  • Rendering and visualisation
  • Input handling
  • Scene management
  • Automated headless testing

The project uses Godot's plugin-oriented structure to separate major areas of functionality.

GDScript

GDScript is used as the primary programming language within the Godot project.

It was selected because it is tightly integrated with Godot and provides direct access to the engine's simulation, scene, rendering and input APIs.

Using GDScript also reduces the complexity of developing the simulation compared with introducing an additional programming language into the core Godot application.

The project uses GDScript for components including:

  • Simulation control
  • Simulation timing
  • Arena behaviour
  • Stimulus management
  • Treatment events
  • Recording
  • Automated tests
  • User interface logic

JSON

JSON is used for experiment presets and configuration data.

JSON was selected because it is human-readable, widely supported, easy to generate programmatically, and suitable for representing structured experimental parameters.

A preset can contain information such as:

  • Simulation settings
  • Random seed
  • Fixed time step
  • Arena configuration
  • Stimuli
  • Stimulus schedules
  • Treatment conditions
  • Experimental parameters

This allows experiments to be configured independently from the simulation code.

For example, the project uses experiment preset files such as:

presets/mcsf_sprint_one.json

Using external configuration also improves reproducibility because the parameters used for an experiment can be stored and reused.

CSV

CSV is used as a format for exporting recorded simulation data.

CSV was selected because it is simple, portable, and supported by common data-analysis tools. It allows simulation results to be inspected in spreadsheet software or processed by Python-based analysis tools.

Potential recorded information includes:

  • Simulation step
  • Simulation time
  • Agent position
  • Current region
  • Active stimuli
  • Treatment events
  • Interventions

Python

Python is intended to provide an interface for future data analysis and machine learning workflows.

Python was selected because of its extensive ecosystem for scientific computing, statistical analysis, visualisation, and machine learning.

This allows data generated by the simulation to eventually be processed outside of Godot without coupling the simulation itself to a specific machine learning framework.

The planned workflow is:

Godot Simulation

Recorded Data

JSON / CSV Export

Python

Analysis / Machine Learning

PyTorch

PyTorch is planned as part of the project's machine learning integration.

PyTorch provides a mature ecosystem for developing and training machine learning models and is widely used in research environments.

The simulation can therefore act as a controlled source of behavioural data that can later be supplied to machine learning models.

PyTorch is considered a future integration rather than a dependency of the current core simulation.

Git

Git is used for version control.

Git provides:

  • Feature branches
  • Commit history
  • Change tracking
  • Branch merging
  • Rollback capabilities
  • Individual contribution history

The team follows a feature-based GitHub Flow methodology while using Gitea as the repository host.

Gitea

Gitea is used to host the project's Git repositories and support team collaboration.

The team uses Gitea for:

  • Repository hosting
  • Feature branches
  • Pull requests
  • Code review
  • Collaboration
  • Version history

Using Gitea also provides a central location from which the team's development history can be reviewed.

Docusaurus

Docusaurus is used to build the project's documentation website.

Docusaurus was selected because it provides a documentation-focused framework based on Markdown and supports:

  • Structured documentation
  • Sidebar navigation
  • Search
  • Version control through Git
  • Custom React components
  • Static site generation

This allows the documentation to remain within the project's version-controlled development workflow.

Cloudflare Pages

Cloudflare Pages is intended to host the generated Docusaurus documentation.

It provides static hosting suitable for a documentation website and allows the generated site to be made publicly accessible.

The deployment workflow is:

Docusaurus Markdown

Docusaurus Build

Static Website

Cloudflare Pages

Public Documentation

This satisfies the requirement for the project documentation to be publicly available without requiring visitors to have a Gitea account.

Overall Technology Architecture

The technologies work together as follows:

┌──────────────────────┐
│ Godot 4 │
│ Virtual Simulation │
└──────────┬───────────┘

JSON / CSV Data


┌──────────────────────┐
│ Python │
│ Analysis / ML Tools │
└──────────┬───────────┘

PyTorch


Machine Learning


Development & Documentation
────────────────────────────────────────

Git → Gitea

├── Source Code
├── Tests
└── Documentation

Docusaurus


Cloudflare Pages


Public Documentation

Technology Selection Rationale

The overall stack was selected to minimise unnecessary complexity while keeping the system extensible.

Godot provides the simulation and visualisation layer, GDScript provides direct control over the simulation, JSON provides reproducible experiment configuration, and CSV provides portable data export.

Python and PyTorch provide a clear path toward future machine learning and statistical analysis without requiring those technologies to be part of the simulation's core execution environment.

Git and Gitea support collaborative development, while Docusaurus and Cloudflare Pages provide a maintainable and publicly accessible documentation solution.


AI Attribution: The preceding document was generated and edited with assistance from ChatGPT Web (GPT-5.6 Luna).