A visualizer for the percolation problem solved with Weighted Union Find

Overview

Percolation Visualizer

Description

A visualizer for the percolation problem. Uses Weighted Union Find with Path Compression for solving the problem and StdDraw from alg4.jar to draw. Includes real-time flow which updates filled sites after every new site is opened.

NEW: Interactive mode where you can open and fill sites on the grid using your mouse.

Visuals

Note: Real-time percolation is now way faster, the shown gif is from a previous version.

Installation

Yank the entire directory.
External libraries used: Uses alg4.jar which is included in /lib. Add it to the referenced libraries.

Usage

Console inputs:

  1. Run PercolationVisualizer.java.
  2. Enter z in console for normal randomized site opening mode; or x for interactive mode.
  3. Steps for different modes:
    3.1 (Normal Mode) Enter two ints seperated by a whitespace. The first corresponds to size of the grid, the second to number of trials. Open the newly generated window.
    3.2 (Interactive Mode) Enter one int for the size of grid and open the newly generated window.

After each trial, the percent of sites open when percolation happens are logged and displayed for a brief moment (default: 1.5s, can be changed). After the end of all trials, the mean percent of open sites, standard deviation, and other data are shown.

In the interactive mode, keep the sample size low.

Important: You can change boolean realTimeFlow to turn real time flow off (on by default).

Author

Ajinkya Talekar | ajinkyatalekar.github.io

You might also like...

Function allowing you to find duplicate in an array in linear time and constant space

Floyd's tortoise and hare Function allowing you to find duplicate in an array in linear time and constant space ! Floyd's method is a pretty amazing,

Mar 29, 2022

Uses modified Jaro distance to find closest result to search term

Uses modified Jaro distance to find closest result to search term

Jan 17, 2022

The purpose of this repository is to help contributors find GSoC organizations through their technology stack

The purpose of this repository is to help contributors find GSoC organizations through their technology stack

The purpose of this repository is to help contributors find GSoC organizations through their technology stack. If it can help you, please give me a 🌟

Jan 9, 2023

Find out what the sign is from a specific day and month

Find out what the sign is from a specific day and month

WhatMySign Find out what the sign is from a specific day and month Preview How to use To run it is simple, first download the file of the program by c

Feb 3, 2022

An android app that builds for students to find study partners.

An android  app that builds for students to find study partners.

Rinder The purpose of this project is to make a one-stop solution for finding the desired reading or research partner, sell their own products, and al

Dec 14, 2022

Find different kinds of algorithm questions and solutions in different software languages

Find different kinds of algorithm questions and solutions in different software languages

Algorithm Samples ⭐ Find this project useful? If you think it has helped you, you can star this repo and join the Stargazers and motivate us to share

Oct 31, 2022

Convenient search view for Eclipse to find/replace within the currently active editor.

Convenient search view for Eclipse to find/replace within the currently active editor.

Find/Replace View plugin for Eclipse Feedback and high-quality pull requests are highly welcome! About What is it? Installation Building from Sources

May 25, 2022

Find solutions for the Cognizant Early Engagement Program [ Continuous Skill Development ].

Cognizant-Early-Engagement Early Engagement is a learning portal offered by Cognizant, where you can learn basic concepts of Java, Sql, Web Develepome

Jan 3, 2023

A sample repo to help you find an element by text for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you find an element by text for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to find an element by text for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows

Jul 13, 2022

By this package we can get sim info, call logs and sms logs.Also we can find for specific sim info and call logs as well.

sim_sms_call_info A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package

Sep 17, 2022

Maven plugin to help creating CHANGELOG by keeping one format and solving merge request conflicts problem by extraction of new CHANGELOG entries to seperate files.

keep-changelog-maven-plugin CHANGELOG.md is one of the most important files in a repository. It allows others to find out about the most important cha

Aug 28, 2022

Comparison between Java and Common Lisp solutions to a phone-encoding problem described by Prechelt

Prechelt Phone Number Encoding This project implements the phone number encoding described by Lutz Prechelt in his article for the COMMUNICATIONS OF T

Nov 30, 2021

Traveling Salesperson Problem with Salesforce Functions

Traveling Salesperson Problem with Salesforce Functions

Lightning Function Demos Node.js + Platform Events This demo uses a combination of Flow, Evergreen Functions, CDC, and Lightning Web Components. Rough

Jan 13, 2022

Problem-solving - A repository to contain my submissions in various online judges.

Problem Solving A repository to contain my submissions in various online judges. beecrowd # Problem Title Solution 1000 Hello World! [Link] 1001 Extre

Nov 15, 2022

The CSES Problem Set is a collection of algorithmic programming problems.

The CSES Problem Set is a collection of algorithmic programming problems. The goal of the project is to create a comprehensive high quality problem se

Jan 5, 2022

The repository contains the solutions from the problem set of pepcoding dsa level 1.

DSA Level 1 Data Structures and Algorithms in Java Solve Here Class Notes   200 Hours   Level 1 [Beginner] This is for anybody who has not coded at-le

Oct 12, 2022

This is the java/Maven application we are building to solve one real world problem.

timly This is the java/Maven application we are building to solve one real world problem. As in MLH we are working with fellows across the globe and e

Feb 16, 2022

Triple X is a 2D space game based on The Three-Body Problem

Triple X is a 2D space game based on The Three-Body Problem

Triple X is a 2D space game based on The Three-Body Problem, which is the famous sci-fi novel wrote by Cixin Liu.

Feb 19, 2022
Owner
Ajinkya Talekar
Ajinkya Talekar
Find different kinds of algorithm questions and solutions in different software languages

Algorithm Samples ⭐ Find this project useful? If you think it has helped you, you can star this repo and join the Stargazers and motivate us to share

Serkan Alc 37 Oct 31, 2022
Car-Sequencing-Problem - Car-Sequencing Problem solved with Constraint Programming approach

Car-Sequencing problem solved with Constraint Programming : Problem Description : Cars in a production line can be configured with various options. A

Anas OUBAHA 4 Sep 7, 2022
8-Puzzle problem solved using the A* search algorithm.

8-Puzzle This program written in Java solves the 8-puzzle problem (and its natural generalizations) using the A* search algorithm. The Problem: The 8-

null 1 Jun 7, 2022
Table-Computing (Simplified as TC) is a distributed light weighted, high performance and low latency stream processing and data analysis framework. Milliseconds latency and 10+ times faster than Flink for complicated use cases.

Table-Computing Welcome to the Table-Computing GitHub. Table-Computing (Simplified as TC) is a distributed light weighted, high performance and low la

Alibaba 34 Oct 14, 2022
Union, intersection, and set cardinality in loglog space

HyperMinHash-java A Java implementation of the HyperMinHash algorithm, presented by Yu and Weber. HyperMinHash allows approximating set unions, inters

LiveRamp 48 Sep 22, 2022
Plugin for fixing crash caused by dispensing shulker box by Union of Black Bean.

UBBDispenserShulkerBoxCrashFixer 繁體中文(香港) Purpose In servers lower than 1.13, when a dispenser is placed at y=0 and facing downwards / y=(max build he

Union of Black Bean 44 Dec 24, 2022
Path Finding Visualizer for Breadth first search, Depth first search, Best first search and A* search made with java swing

Path-Finding-Visualizer Purpose This is a tool to visualize search algorithms Algorithms featured Breadth First Search Deapth First Search Gready Best

Leonard 11 Oct 20, 2022
JavaFX Graph Traversal Visualizer

GraphSearchVisualizer [email protected] https://github.com/MitchellGray100/GraphSearchVisualizer JavaFX Graph Traversal Visualizer Visual grap

Mitchell Gray 4 Jan 28, 2022
The Argo's repo: where the ArgoCompiler and the ArgoVM find their home.

Argo ArgoVM is a stack-based virtual machine similar to JVM. It runs the file provided by ArgoC (Argo Compiler) which transform the argo-lang into an

Giuseppe B. 3 Oct 17, 2022
mobsfscan is a static analysis tool that can find insecure code patterns in your Android and iOS source code.

mobsfscan is a static analysis tool that can find insecure code patterns in your Android and iOS source code. Supports Java, Kotlin, Swift, and Objective C Code. mobsfscan uses MobSF static analysis rules and is powered by semgrep and libsast pattern matcher.

Mobile Security Framework 347 Dec 29, 2022