Skip to content

A voting machine capable of deciding an election by instant runoff

Notifications You must be signed in to change notification settings

ksscott/VotingMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 

Repository files navigation

Logo Voting Machine

Voting Badge Contributors Activity

A voting machine capable of deciding an election by instant runoff.

Getting Started

Discord Bot

This application is primarily intended to be run as a Discord bot. Follow Discord's instructions for adding a bot to your server. When it's configured, execute this application from the main method in Bot.java, passing in your bot's token as the single runtime argument. The application will connect to your server and register various slash commands needed to interact with the bot. Type /help in a channel called #bot-commands to get started.

Elections

Candidates

The Discord bot initializes an election with a set of games to choose between. Tweak the source code to replace these with the candidates of your choosing. Additional candidates can be suggested after the election starts.

Evaluation Algorithms

By default, a Weighted Runoff process is used to decide elections. Several other algorithms have been included; pass one in to the Evaluator method below to evaluate the election using an alternate algorithm.

evaluateElection(Election<V> election, Function<Race,EvalAlgorithm<V>> algorithm)

Races

Multiple "races" are supported, to allow simultaneous election of a winner in multiple categories, similar to political elections. Currently, the Discord bot only supports elections with a single race.

Dependencies

About

A voting machine capable of deciding an election by instant runoff

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages