Skip to content

A Python simulation of a randomized algorithm for solving the consensus (Coordinated Attack) problem in distributed systems.

License

Notifications You must be signed in to change notification settings

TheMn/randomized-coordinated-attack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Randomized Coordinated Attack

This repository contains a Python script that simulates a randomized algorithm for solving the consensus problem in a distributed system. This is often analogized as the "Coordinated Attack" problem.

The script simulates a number of processes that try to reach a consensus (agree on a decision) despite the possibility of communication failures. The simulation runs the algorithm multiple times to measure its effectiveness and plots the results.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have Python 3 installed on your system. You will also need the following Python libraries:

  • matplotlib
  • networkx

Installation

  1. Clone the repository to your local machine:
    git clone https://github.com/TheMrn/Randomized-Coordinated-Attack.git
  2. Install the required libraries using pip:
    pip install matplotlib networkx

Usage

To run the simulation, simply execute the random-attack.py script:

python random-attack.py

The script will run a simulation and generate a plot showing the agreement rate as a function of the number of rounds (r). The plot will be displayed in a new window.

The main parameters of the simulation, such as the number of processes and the number of rounds, can be adjusted by modifying the script.

About

A Python simulation of a randomized algorithm for solving the consensus (Coordinated Attack) problem in distributed systems.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages