davidnhill / jsminesweeper Goto Github PK
View Code? Open in Web Editor NEWMinesweeper player, solver and analyser in javascript
Home Page: https://davidnhill.github.io/JSMinesweeper/
License: MIT License
Minesweeper player, solver and analyser in javascript
Home Page: https://davidnhill.github.io/JSMinesweeper/
License: MIT License
I tried to download a board in the analyzer, but nothing poped up.
Taking a look into the console reviled:
Save file picker exception: window.showSaveFilePicker is not a function
As I'm using Firefox 120.0 it seems that my browser does not support a download. Take a look at the "Browser compatibility"-section of https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker
TL;DR: i THINK analyzer breaks when leftclicking/leftdragging THROUGH cells that have a mine in
finds board is in invalid state when it absolutely isn't. says tile is invalid
sometimes even just refreshing the tab corrects the problem with the same exact state of the board
i do hope the invalid state "pinpointer" stays but right now it is overdoing it
edit: it suffices to say the necessary leftclick/leftdragging to rebuild analyzing situations is still easily the weakest point (UX-wise) of this otherwise monumental MS tool at this point :)
I would expect the solver (to try) to solve the grid, and guess tiles, like it has done flawlessly for many other seeds
This seed combination causes the solver to error out, locking out the game canvas
Always on Firefox 89.0.2 on Ubuntu x64
Always on Chromium 91.0.4472.114 on Ubuntu x64
Firefox 89.0.2:
Uncaught (in promise) TypeError: commonClears is null
secondarySafetyAnalysis https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/solver_main.js:1024
tieBreak https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/solver_main.js:518
doSolve https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/solver_main.js:456
solver https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/solver_main.js:52
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1238
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1278
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1278
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
setTimeout handler*sendActionsMessage https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:1267
on_click https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:907
startup https://davidnhill.github.io/JSMinesweeper/Minesweeper/client/main.js:152
Chromium 91.0.4472.114:
Uncaught (in promise) TypeError: Cannot read property 'length' of null
at secondarySafetyAnalysis (solver_main.js:1024)
at tieBreak (solver_main.js:518)
at doSolve (solver_main.js:456)
at solver (solver_main.js:52)
at sendActionsMessage (main.js:1238)
at main.js:1278
love the solver so far, especially the JS one, I would appreciate if we can make setting up boards in Analysis mode a little easier. i have come up with 2 small suggestions for now:
instead of left-clicking each and every cell i would love to be able to keep the left click pressed so we fill out larger patches more quickly
[an option so that] mousewheel down to set the cell's minecount at first does not take into account flags and mines around it (i.e. first mousewheel down always sets a 1). left click is still there doing it normally then.
i dont know if i missed out on any keyboard hotkeys, i dont think i have found any. would love a hotkey for the "Analyze" button for example.
Obviously these are not github issues but I didnt wanna dig to deep for direct contact possibilities.
Thank you.
might be related to that last update?
ive encountered this several times now.
reproducible if u recreate the board in the img (web js version)
sorry if this is not a bug but an efficiency trick i do not know about...
edit: yea i think it only does that if it is 100% sure clicking then chording is definitely not gonna take more clicks...i still think these are new occurences and haven't appeared until recently.
When starting an Expert game and clicking analyse, the corner tiles are marked as having a 39.57% chance of progress. If my understanding is correct, it is the probability none of the adjacent tiles are mines, which should be approx 79^3=50% ?
I also have a question about the way the engine choses its move when guessing. In the file I send along with this post, the engine recommends I play (0,5) which is insane considering the engine thinks it has worse safety, secondary safety and progress than (1,2).
Something else that confuses me : if you for example replace the bottom left corner's 2 by a 1, the engine will stop calculating the secondary safety and progress of (0,5) despite it being shown in yellow and being within the 10% cutoff range (83.33%*0.9=75% and (0,5) has a safety of 79.48).
I am using the solver through the link on the github.
Maybe these issues are related, so I throw them together.
Hopefully I expressed myself clearly enough. Thanks for the great tool.
The algorithm and overall functionality work wonderfully. However, I need the solver script to be separate from the visual code. I want to work on automation using my own board and different technologies. How can I extract the solver script so I can input my board and get the optimal moves and mines as output in pure JavaScript? Do you have any plans to write a standalone solver algorithm without the visual component?
Maybe I'm doing something wrong, but playing efficiency mode with hints on, I can't figure out how to use chording. Also, after placing a mine the game seems to freeze up and not let me click anything. Please help, thank you
first, it's an amazing tool, best among what i've found and seen yet, also like what i always wanted to create! (but took few action)
then title says it all.
btw the code smells like translated by hands? you might consider using haxe language (which looks like js/ts (when not doing weird things and deep customization) and compiles to js, but also c/c++/c#/more!) to port the solver core into many languages.
although, it's always harder to port into webassembly....
It is great if you could add an open source license to this project (maybe the MIT License or the LGPLv3?) so that other users could modify and redistribute your code.
Currently, without a license, all I could do is fork and modify the repo inside GitHub.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.