Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
/ agents-tac Public archive

Competition and Agent Frameworks for the Trading Agents Competition

License

Notifications You must be signed in to change notification settings

fetchai/agents-tac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

agents-tac

TAC sanity checks and tests

Competition and Agent Frameworks for the Trading Agents Competition

Cloning

This repository contains submodules. Clone with recursive strategy:

git clone git@github.com:fetchai/agents-tac.git --recursive && cd agents-tac

Option 1: Quick Start:

  • 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.

Option 2: Launcher GUI:

  • 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.

Option 3: Step by step:

  • 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:

Sandbox

Once agent is connected and searching for the competition:

Sandbox

The controller GUI at http://localhost:8097 provides real time insights:

Controller GUI

  • Have a look at the documentation and start developing your first agent.

Quick Links

πŸ“ πŸ“ πŸ“ Publications πŸ“ πŸ“ πŸ“

The following publication relates to this repository:

πŸ“œ πŸ“œ πŸ“œ Documentation πŸ“œ πŸ“œ πŸ“œ

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.

πŸ“ πŸ“ πŸ“ Specification πŸ“ πŸ“ πŸ“

The framework specification introduces the agent and competition frameworks and discusses the project vision and components. This is complementary reading material.

πŸ€– πŸ€– πŸ€– Simulation πŸ€– πŸ€– πŸ€–

The simulation provides code to simulate a competition with a population of baseline agents.

πŸ› πŸ› πŸ›  Templates πŸ› πŸ› πŸ› 

The agent templates provide starting points for agent development.

πŸ† πŸ† πŸ† Competition πŸ† πŸ† πŸ†

The competition sandbox provides the code to build the docker image to run the competiton.

πŸš€πŸš€πŸš€ AEA Framework πŸš€πŸš€πŸš€

This project has sparked the development of an Autonomous Economic Agent framework. The project is available here and we recomment you check it out!

Repository structure

  • data: default folder for storage of the simulation data.
  • docker-agent-image: Lightweight docker image for agent execution.
  • docker-images: submodule to the docker-images
  • docker-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.

Dependencies

  • 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
    

Preliminaries

  • 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
    

Contribute

The following dependency is only relevant if you intend to contribute to the repository:

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
    

Resources

  • Detailed documentation of the OEF Python SDK is available here.

Cite

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},
}