Skip to content

lacogitolab/april

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Primitive Life Form (PLF) Simulation

This project simulates a primitive life form in a 2D environment with various obstacles and resources. The simulation uses reinforcement learning to control the PLF's behavior.

Project Structure

  • brain/: Backend server implementing the environment and RL algorithms
  • environment/: Frontend 3D visualization using Three.js

Setup and Running

Backend (Python)

  1. Create a virtual environment and activate it:
cd brain
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the server:
cd src
python server.py

The server will start on http://localhost:8000

Frontend (Node.js)

  1. Install dependencies:
cd environment
npm install
  1. Start the development server:
npm start

The frontend will be available at http://localhost:5173

Features

  • 3D visualization of the PLF and environment
  • Different types of obstacles (radiation, scald, food)
  • Health and energy system
  • Reinforcement learning-based control
  • Real-time visualization of PLF's state

API Endpoints

  • GET /state: Get current state of the environment
  • POST /step: Take a step in the environment
  • POST /reset: Reset the environment
  • POST /train: Train the RL model

Visualization

  • Green sphere: PLF
  • Red spheres: Radiation obstacles
  • Orange spheres: Scald obstacles
  • Green spheres: Food resources
  • Gray plane: Environment boundary

About

Experimental artifical primitive intelligence (APRIL)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors