Giter Site home page Giter Site logo

ajainuary / bolt-auction-challenge Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 265 KB

A Completely Asynchronous Auction Simulator

License: GNU Affero General Public License v3.0

Shell 0.20% Python 94.89% HTML 4.62% CSS 0.18% JavaScript 0.11%
auction-simulator game-theory asynchronous

bolt-auction-challenge's Introduction

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

bolt-auction-challenge's People

Contributors

ajainuary avatar

Stargazers

Aleksandr Anenkov avatar

Watchers

James Cloos avatar  avatar

bolt-auction-challenge's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.