Skip to content

This project was offered by the Speedcubing Club, IIT Kanpur under the Science and Technology Council during 2020-21-II Semester.

Notifications You must be signed in to change notification settings

debmanna/Speedcubing_Project-SnT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

Speedcubing_Project-SnT

This project was offered by the Speedcubing Club, IIT Kanpur under the Science and Technology Council during 2020-21-II Semester. The Solver part focused on solving a random scramble of a 3x3 cube using the Thistlethwaite method.

We were given some assignments to get comfortable with basics of cube theory, cube notations, STL in C++ and graphs. This folder contains my personal submissions.

It was based on Cube Theory. We were provided with resources (Basic Notations) to get familiar with it. Answers were collected through a Google form.

We had to learn about C++ STL and Graphs. The submission to assignment can be found as P1Q1, P1Q2, P1Q3, P1Q4, P2Q1, P2Q2, P2Q3 and P2Q4.

We had to implement the Double Ended BFS to perform the sequence of moves to finish a Phase in the Thistlethwaite method. This was a sub task for the code SolverCodeThistlethwaite.cpp.

Aims:

-Integrating the Solver code (Thistlethwaite method) with the 3x3 Simulation.

-Collecting data after performing random scrambles and feeding it to the Solver code.

-Getting statistics

1. Integration:

We used text files to communicate with the two different codes (one in C++ and other in Processing).

The simulator code was modified so that it returns the moves we randomly perform into a text file RandomScramble.txt. This file now acts as an input for our Solver code.

The Solver code (SolverCodeThistlethwaite.cpp) takes the inputs from RandomScramble.txt and after applying phase wise double-ended BFS, it returns a sequence of moves that will solve the cube. This sequence of moves is written to a file called SolverOutput.txt. Basically, running the Solver code on a C++ compiler will automatically take the input and create the output file for you!

Now the simulator code reads the sequence of moves from SolverOutput.txt and performs those moves on the cube.

2. Collecting Data:

The Solver code was modified to DataGenerator.cpp in order to get data about phase wise moves, the time taken for each phase in addition to the total moves and total time taken.

A sample of random scrambles was taken as a text file (RandomScrambleData.txt) and was passed on to DataGenerator.cpp. It generated the required data into a text file (Data.txt). This data will now be used to generate statistics.

3. Statistics:

The text file Data.txt was converted to .csv format contained in Data__Stats.xlsx. Then carried out basic statistical operations on the csv file in MS Excel. Sheet 1 of Data__Stats.slsx contains the data (and some theoretical stats) whereas Sheet 2 has the stats represented graphically.

The Converter.py contains the code to convert the .txt file generated by the solver code to .csv file.

Team Members:

  • Mandar Wayal
  • Debanjan Manna
  • Narendra Prajapat

About

This project was offered by the Speedcubing Club, IIT Kanpur under the Science and Technology Council during 2020-21-II Semester.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.6%
  • Python 3.4%