NOTE: This repo is archived. Please refer to the AEA Framework repo which is the new framework for creating autonomous economic agents. There are example TAC agents in that repo as well.
Competition and Agent Frameworks for the Trading Agents Competition
This repository contains submodules. Clone with recursive strategy:
git clone git@github.com:fetchai/agents-tac.git --recursive && cd agents-tac
-
Follow the steps under 'Dependencies' and 'Preliminaries' below
-
Enter the virtual environment and launched the script:
pipenv shell python scripts/launch.py
The controller GUI at http://localhost:8097 provides real time insights.
-
Follow the steps under 'Dependencies' and 'Preliminaries' below
-
Build the sandbox:
cd sandbox && docker-compose build && cd ..
-
Enter the virtual environment and start the launcher GUI. Then launch the sandbox with your prefered configs:
pipenv shell python tac/gui/launcher/app.py
The controller GUI at http://localhost:8097 provides real time insights.
-
Follow the steps under 'Dependencies' and 'Preliminaries' below
-
In one terminal, build the sandbox and then launch it:
cd sandbox && docker-compose build docker-compose up
-
Optionally, in another terminal, enter the virtual environment and connect a template agent to the sandbox:
pipenv shell python templates/v1/basic.py --name my_agent --dashboard --expected-version-id tac_v1
The sandbox is starting up:
Once agent is connected and searching for the competition:
The controller GUI at http://localhost:8097 provides real time insights:
- Have a look at the documentation and start developing your first agent.
The following publication relates to this repository:
The package documentation introduces the key components of the agent and competition frameworks and helps agent developers getting started. This is required reading material if you want to build your own agent.
The framework specification introduces the agent and competition frameworks and discusses the project vision and components. This is complementary reading material.
The simulation provides code to simulate a competition with a population of baseline agents.
The agent templates provide starting points for agent development.
The competition sandbox provides the code to build the docker image to run the competiton.
This project has sparked the development of an Autonomous Economic Agent framework. The project is available here and we recomment you check it out!
data
: default folder for storage of the simulation data.docker-agent-image
: Lightweight docker image for agent execution.docker-images
: submodule to the docker-imagesdocker-tac-develop
: Docker image for the development of TAC related stuff.docs
: the docs for this project.notebooks
: contains jupyter notebooks with exploratory code.sandbox
: competition setup using Docker compose.scripts
: scripts to run.simulation
: contains scripts for simulation of the TAC.tac
: the main folder containing the Python package.templates
: template agents.tests
: tests for the package.
-
All python specific dependencies are specified in the Pipfile (and installed via the commands specified in 'Preliminaries').
-
The package requires that you install Docker and the sandbox requires that in addition, you install Docker Compose.
-
The project requires oef-search-pluto which can be pulled here:
docker pull fetchai/oef-search:0.7
-
Create and launch a virtual environment:
pipenv --python 3.7 && pipenv shell
-
Install the dependencies:
pipenv install
-
Install the tac package:
python setup.py install
The following dependency is only relevant if you intend to contribute to the repository:
- the project uses Google Protocol Buffers compiler for message serialization. A guide on how to install it is found here.
The following steps are only relevant if you intend to contribute to the repository. They are not required for agent development.
-
Clear cache and remove old environment
pipenv --clear pipenv --rm
-
Install development dependencies:
pipenv install --dev
-
(Optional) to install exact dependencies use:
pip install -r requirements_all.txt --extra-index-url https://test.pypi.org/simple/
-
Install package in (development mode):
pip install -e .
-
After changes to the protobuf schema run:
python setup.py protoc
-
To run tests (ensure no oef docker containers are running):
tox -e py37
-
To run linters (code style checks):
tox -e flake8
-
To run static type checks:
tox -e mypy
-
We recommend you use the latest OEF build:
python scripts/oef/launch.py -c ./scripts/oef/launch_config.json
- Detailed documentation of the OEF Python SDK is available here.
If you are using our software in a publication, please consider to cite it with the following BibTex entry:
@misc{agents-aea,
Author = {Marco Favorito and David Minarsch and Diarmid Campbell},
Title = {Trading Agent Competition with Autonomous Economic Agents},
Year = {2019},
}