Go to file
2025-06-04 17:28:14 +01:00
.devcontainer Install pipenv. 2025-03-02 12:15:20 +00:00
NeuronServer Read configuration from central configuration file. 2025-03-02 15:20:07 +00:00
YAWNING-TITAN Read configuration from central configuration file. 2025-03-02 15:16:24 +00:00
.gitignore Initial commit. 2025-03-02 12:15:33 +00:00
config.yaml Read configuration from central configuration file. 2025-03-02 15:16:24 +00:00
LICENSE Added license information and contact details. 2025-06-04 17:28:14 +01:00
README.md Added license information and contact details. 2025-06-04 17:28:14 +01:00

YAWNING-TITAN: "Neuron Soup" Edition (U75AT042: UoE - Biological AI)

This repository contains a modified version of YAWNTING-TITAN, allowing YAWNTING TITAN to interact with biological neurons using the API provided by Cortical Labs.

Summary of Changes to YAWNING-TITAN

There are significant changes in the file YAWNING-TITAN/src/yawning_titan/envs/generic/core/blue_action_set.py. This is the default implementation for Neuron Soup Yawning Titan. This negotiates between Yawning Titan more broadly and the neuron server. It contains code for receiving spikes and sending stimulations. It requires a connection to Cortical Labs to function, and a local server that connects YAWNING-TITAN to the Cortical Labs backend. We provide to version of this server in the directory NeuronServer:

  • NeuronServer/neuron_server.py: This is the productive version that requires the Cortical Labs backend to be present as well as the Python package cl from Cortical Labs to be installed.
  • NeuronServer/neuron_fake_server.py: This is stub implementation of the server, faking responses by randomness. Thus, it does not require the backend of Cortical Labs to be present and can be used for testing purposes.

Furthermore, YAWNING-TITAN/src/yawning_titan/envs/generic/core/red_action_set_requires_spikes_to_proceed.py is a file that can be used to require spikes from neurons before red agent attacks can proceed. There are no stimulations so as to avoid training the neurons to be red. This is passive. Use this red action first to establish a baseline with original_blue_action_set.py, then run the neuron blue action set (default) with the default red action set to train the neurons on blue, then recopy the original blue action set file along with the red_action_set_requires_spikes_to_proceed.py file. This applies the trained neurons to red, and a faster red time should indicate learning. Note, red_action_set_requires_spikes_to_proceed.py requires a connection to Cortical Labs to function too.

Minor changes have been made to the reward function file, and game_mode_db.py to prevent crashes.

Small bonus programs for test runs and development can be found in YAWNING-TITAN/src/yawning_titan/integrations/neurons. The program notes at the top of each file explain what they do and note if an external computer connection is required. There are also bonus versions in YAWNING-TITAN/src/yawning_titan/envs/generic/helpers of graph2plot.py which can send, after a YAWNING-TITAN simulation run, data to the neurons from the animation function if it is selected on the main screen. This again requiring a connection to Cortical Labs to function.

Installation

The YAWNING-TITAN "Neuron Soup" Edition has the same requirements (in particular Python 3.8 or 3.9) as the regular version of YAWNING-TITAN does. Also the installation is essentially the same. Thus, for more details, please consult the RADME.md of YAWNTING-TITAN. The main steps for installing YAWNING-TITAN: "Neuron Soup" Edition are:

Installation of Python 3.9

As Python 3.9 is already somewhat outdated and to avoid conflicts with already existing Python installations, we recommend using a dedicated container. This repository contains a .devcontainer directory that includes a Dockerfile (tested to work with both Docker and Podman) and that follows the "develop in a container approach" of Visual Studio Code, i.e., a installation of Visual Studio Code with the Dev Containers Extension should automatically offer to open this workspace (project) in a suitable development container.

Installation of YAWNING-TITAN "Neuron Soup" Edition

In the main folder of this project, i.e., in the same folder that contains this file, create a new Python virtual environment (venv):

python3 -m venv <name_of_venv>

And activate it:

source <name_of_venv>/bin/activate

Finally, install all dependencies as follows:

python3 -m pip install -e YAWNING-TITAN

Configuration

The IP of the Cortical Labs backend (on which, in the productive configuration, the neuron server should be started) as well as the port used can be configured in the file config.yaml. The default configuration assumes the server to be executed on localhost (127.0.0.1), which should work "out-of-the-box" with the fake server.

Starting YAWNING-TITAN "Neuron Soup" Edition

Using YAWNING-TITAN "Neuron Soup" Edition requires starting two server processes within the previously created Python virtual environment.

1. Starting the Neuron Server

First, start the server that connects YAWNING-TITAN to server that provides the connection to the backend of Cortical Labs:

./NeuronServer/neuron_server.py

Note that this only works on a system that has the backend of Cortical Labs and the corresponding Python package (cl) installed. To test YAWNING-TITAN "Neuron Soup" with a "fake" server, use:

./NeuronServer/neuron_fake_server.py

2. Starting YAWNING-TITAN "Neuron Soup" Edition

To start YAWNING-TITAN "Neuron Soup", execute the following two commands:

./<name_of_venv>/bin/yawning-titan setup
./<name_of_venv>/bin/yawning-titan gui

After the successful start, you can access YAWNING-TITAN "Neuron Soup" Edition with your web browser at http://127.0.0.1:8000.

Team

Main contacts:

License

This project is licensed under a MIT license.

SPDX-License-Identifier: MIT