sliding-puzzle | Sliding puzzle built using ES6
kandi X-RAY | sliding-puzzle Summary
kandi X-RAY | sliding-puzzle Summary
Sliding puzzle built using ES6
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sliding-puzzle
sliding-puzzle Key Features
sliding-puzzle Examples and Code Snippets
Community Discussions
Trending Discussions on sliding-puzzle
QUESTION
I want to generate several 3x3 puzzles (https://datawookie.netlify.app/blog/2019/04/sliding-puzzle-solvable/) with the same difficulty where difficulty is defined as the minimum necessary moves to reach the solution. For example, in a puzzle [1,2,3,4,5,6,7,0,8], the minimum necessary move is 1 because we can reach the solution by moving 8 up.
The above site has a python code to determine solvability, and I modified it a little bit so that it gives me the number of inversions:
...ANSWER
Answered 2020-Jun-02 at 10:28The "difficulty" of a puzzle can be estimated by different metrics (e.g. number of inversions, initial configuration, size, etc.). Some are meaningful, some are not. That's up to you to try different ones and decide whether they are good "difficulty" estimators. But keep in mind that sometimes, what you call "difficulty" is subjective.
Find those metrics and try to evaluate your puzzles with them.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sliding-puzzle
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page