Skip to content

ajainuary/bolt-auction-challenge

Repository files navigation

Logo
Bolt Auction Challenge

A Completely Asynchronous Auction Simulator
Explore the docs »
· Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Acknowledgements

About The Project

The Bolt Auction Challenge is a custom-designed fully asynchronous auction simulator that requires designing an interactive bot

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

The simulator requires aiohttp package and Jinja2 templating engine. In order to install the prerequisites, you can use the following command. The simulator has only been tested on Python 3.7.4

pip install -r requirements.txt

Running an auction

The simulator consists of two parts, the central server and player clients. You must first start the central server by running bolt.py. You can view all output at http://localhost:8080

python bolt.py

Next, you must start the player clients that will initially register themselves with the server with a unique port number as the argument.

python player_client.py [Port Number]

Lastly, you need to run a script that orchestrates an auction.

python run_tournament.py [Number of Matches]

Usage

Making a bot

A template for making your own bot is given in my_bots/dummy.py.

Configuring the client

In any copy of player_client_[n].py change the 3rd line to import your bot.

from my_bots.team_<teamNo> import Team_<teamNo>_Bot

In the 7th line instantiate your bot.

bot = Team_<teamNo>_Bot() #Your bot here

Running custom auctions

In order to run your own custom auction, you need to use run_auction.py. First, you need to specify which bots to run on line 11.

players = ['Batman', 'Superman']  # Select the names of your bots here

Then, you can run the file as follows:

python run_auction.py <Duration> <Key>

Where <Key> is any random number.

Running multiple auctions

In order to run multiple auctions in the manner we would be running in the tournament, you need to use run_tournament.py. First, you need to specify which bots to run on line 10.

players = ['Batman', 'Superman']  # Select the names of your bots here

Then, you can run the file as follows:

python run_tournament.py <No_of_matches>

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

This project was built for the Introduction to Game Theory course at IIIT-H. I am grateful to the students for their feedback and patience.

Changelog

v1.1 25-04-21

  • Various bugfixes
  • Added a leaderboard view

v0.1 19-03-21

  • Auction works in logs
  • Sample clients for bots added

About

A Completely Asynchronous Auction Simulator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages