|
|
03-12-2022, 05:53 PM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Sudokle
To avoid spamming the Wordle thread, this new one is for bug reports, suggestions, and comments about my new Sudokle game. At the time of posting this, it's partly working in Alpha.
Sudokle
Sort of mash-up between Wordle and Sudoku. Green squares are correct and unchangeable (like clues in standard Sudoku). When you complete a row, column, or block, then that group of nine gets scored either green or yellow (yellow means guess was wrong).
On a PC move around using the cursor keys and use the number keys to insert a guess. You can rub out a (non-green) square with space, backspace, or delete. You can play on a phone or tablet, but it's awkward right now. One of the things I need to add is a Wordle-style virtual keypad.
If you play perfectly then you'll never get any yellows apart from the yellow clues you're presented with at the start. Any yellows you get besides the free initial ones are counted and form part of your score for the day.
If you enter an impossible guess (the digit you enter already exists in non-yellow on the same row, column, or block) then the square is marked gray, and you're locked on that square till you change to a different number, or erase the number. Grays are also counted and are a mark of shame - there's no excuse for getting any!
If you're good at Sudoku and find the yellows distracting, you can hide them.
If people think it's worth playing, I'll make the server dole out a fresh puzzle each day. I can also add some things like generating a random puzzle, not the puzzle of the day, if you want to practice. Right now, you'll get the same puzzle every time - it's hard coded in this Alpha version.
__________________
|
03-12-2022, 07:13 PM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
Quote:
Originally Posted by JoeP
Navigation looks good.
Once a square has been marked yellow, a correct guess marks it green even if it duplicates another yellow guess. This makes it easier but is it intentional?
I don't think it's sensible to mark a guess impossible when that's only based on other not-yet-scored guesses. It might actually be correct!
In fact I'm not sure the "impossible" calculation is correct. I've clicked "hide squares marked incorrect" (why isn't that reversible, by the way?) and now I'm getting impossible markers that don't make sense.
Anyway, that's my excuse for thinking I'm in a situation that can't be solved.
|
Yellow in a square just means 'the number shown here is wrong'.
The gray-square marking is just to stop you rushing - without it you could put, say, a 2 in every position along a row, to see where the 2 actually is, then repeat with 3, etc.
To minimize your yellow count, when a row/column/block is complete with 9 numbers, but not all green, then it's best to delete at least one of the yellow numbers to blank before changing the others.
Remember the 'impossible' marking applies to the row, column, and block for the square you're currently changing, but any yellows are ignored for the impossible check, since we know they're wrong anyway. If you get a situation marked impossible that you think is a bug, please take a screenshot and post it in this thread so I can work out how to fix the bug.
The reason for not having a 'make yellows visible again' button, is that you might have made several wrong (yellow) guesses for the same square. I'm planning to add a little map of the currently selected square that shows which, if any, of the nine numbers have already been marked yellow.
__________________
Last edited by ceptimus; 03-13-2022 at 04:05 AM.
Reason: Added a comma.
|
03-12-2022, 07:34 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Quote:
Originally Posted by ceptimus
To minimize your yellow count, when a row/column/block is complete with 9 numbers, but not all green, then it's best to delete at least one of the yellow numbers to blank before changing the others.
|
Hmm, that seems a bit unnatural. But with the current mode of scoring as soon as a row or block is full, I can see why it's necessary.
I haven't played a lot of Sudoku recently but when I did I used lots of trial and error. I'd almost rather skip automatic scoring and have a button "Score complete parts".
|
03-13-2022, 03:54 AM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
Quote:
Originally Posted by JoeP
Hmm, that seems a bit unnatural. But with the current mode of scoring as soon as a row or block is full, I can see why it's necessary.
|
It's not necessary, but your yellow score will be higher if you don't do it. Once the 'map of currently selected square' feature is present, then you'll be able to use the 'Hide squares marked incorrect' button instead, without losing any information.
If I swap it to 'press a button to score (all) completed rows/blocks' mode, I need a new way to accumulate the yellow score. Right now, it just adds the number of yellows it marks on the completed row(s) and/or block. Usually you only complete one row/block at once, but you could do two or maximum three. With a button, it would be checking the whole puzzle, so I suppose it should just add the number of 'new' yellows - where it's told you a new number that a square can't be?
Should the button only mark completed rows/blocks of nine, or all unmarked (white) numbers? Or would you like both those buttons?
__________________
|
03-15-2022, 12:55 AM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Quote:
Originally Posted by ceptimus
Should the button only mark completed rows/blocks of nine, or all unmarked (white) numbers? Or would you like both those buttons?
|
Marking only completed rows/columns/blocks seems fine.
Currently I'm being frustrated by not being able enter anything else when you have an "impossible" marker.
|
03-15-2022, 01:01 AM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Quote:
Originally Posted by ceptimus
Remember the 'impossible' marking applies to the row, column, and block for the square you're currently changing, but any yellows are ignored for the impossible check, since we know they're wrong anyway. If you get a situation marked impossible that you think is a bug, please take a screenshot and post it in this thread so I can work out how to fix the bug.
|
Here are impossible markers that I think are wrong. I'm happy for you to point out that I have forgotten how to play Sudoku
- no 9 in that row, column or block
- there's nowhere else for the 4 to go in that block, it has to be right!
Here we see the 4 can't be in the last position of the 2nd row:
... but it shows as impossible in the only other position:
|
03-15-2022, 01:52 AM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
Thanks. Yes definitely buggy. Now I have to figure out why I've not seen those sort of bugs on my PC. What browser are you using? Does it have a debug console? (Ctrl-Shift-i on Firefox). If so, does the debug console report any errors?
Over the weekend, I was working on a fast algorithm to generate Sudoku puzzles. Writing in PHP I've got it down to around one millisecond, but it has a difficult-to-find (for me anyway) bug that sometimes generates sudokus that aren't valid. I'm beginning to think the bug must be deep inside the PHP language itself, but it's more likely one of those bugs that when I eventually find it will just be a letter O instead of a zero, or some other trivial thing. I hate those bugs: you spend days finding them, going slowly mad, and eventually find something like a missing minus sign.
__________________
|
03-15-2022, 01:58 AM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
I'll try to reproduce some and check the console. So far just
Code:
Error: Permission denied to access property "ownerDocument" 5 contentClick.js:215:20
- the 5 is the number of repeats so far, which is about the number of clicks.
|
03-15-2022, 02:03 AM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Now up to 13 repeats, but no other messages, and I get this.
sudokle4.png
This is on Firefox 98.0 on Kubuntu.
|
03-15-2022, 10:54 AM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
I think I fixed that bug now.
Brain now overloaded after changing gears from PHP to JavaScript. Need coffee.
__________________
|
03-15-2022, 11:24 AM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Quote:
Originally Posted by some other kind of wrapper
Code:
<?php
echo '<script type="text/JavaScript">
document.write("<?php echo 'Webception'; ?>");
</script>';
?>
|
Something like that?
|
03-15-2022, 02:35 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Sudokle Alpha #1
⬛ 10
🟨 73
⏲️ 188m23s
Sudokle
|
03-15-2022, 02:35 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Some thoughts:
Are the cells input elements? The text insert cursor isn't really necessary and in a way makes backspace or delete illogical depending on its position. As long as there's another way of handling tabbing maybe they could be plain elements.
It would be neat if, when a cell is marked impossible, the green cell that caused the conflict is highlighted! Until the impossible value is changed.
I found that the domain name sudokle.com is already taken and hosts a somewhat simpler game.
|
03-15-2022, 06:10 PM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
Quote:
Originally Posted by JoeP
Some thoughts:
Are the cells input elements? The text insert cursor isn't really necessary and in a way makes backspace or delete illogical depending on its position. As long as there's another way of handling tabbing maybe they could be plain elements.
It would be neat if, when a cell is marked impossible, the green cell that caused the conflict is highlighted! Until the impossible value is changed.
I found that the domain name sudokle.com is already taken and hosts a somewhat simpler game.
|
Yes, they are input elements at the moment - but that's mainly because I don't really know what I'm doing when it comes to HTML and JavaScript. I'm pretty sure they can just be regular table elements - I'm already using keyboard handlers for the cursor keys, so they could easily do the number entry too. Not sure about the Tab key, but I don't think many people would want to use that anyway - it's just a built-in browser thing that automatically works with 'focusable' elements on the page.
Yes good idea on the highlighting thing.
I want to crack the server-side (PHP) generation of new puzzles bug, before I return to the things I know are needed on the (JavaScript) user interface side. I'll add your highlight idea to the JavaScript list.
If and when I get the auto-generator working, I'll make the first few puzzles a lot simpler, with loads of green clues (and maybe no yellow clues?) so that people can complete the puzzle in just a few minutes. That Alpha #1 one is too hard.
I guess now that someone has beaten us to "Sudokle", I should either just give up, or we need to think of a more unobvious* name to use.
*disobvious? contraobvious?
__________________
|
03-15-2022, 06:39 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Yes. I would like new puzzles. I have solved the currently available puzzle.
|
03-15-2022, 06:39 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Quote:
Originally Posted by ceptimus
I guess now that someone has beaten us to "Sudokle", I should either just give up, or we need to think of a more unobvious* name to use.
*disobvious? contraobvious?
|
Sudo le.
|
03-15-2022, 07:08 PM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
I found the PHP bug I've been searching for since Saturday!
I even translated the program into C# to test my algorithm because I was beginning to suspect a bug inside PHP itself! My C# program had even more bugs, so I gave up on that approach!
Anyway, as expected the bug, once I found it was just a stupid brain fart. I had
>= 0
where I should have had
== $sq
Now it's generating well over a thousand valid puzzles per second.
I'll write some code now to stick the 'puzzle of the day' into a MariaDB database and dole that out when you visit Sudo le, so everyone gets the same one each day (and maybe eventually can revisit previous days). I'll also add the option of 'fresh random puzzle now'. I suppose I could make it share the randomizing seed, when it shares the results, so that others could tackle the same 'random' puzzle.
Edit to add: 11450 puzzles per second on my old Intel Core i7 PC
__________________
Last edited by ceptimus; 03-15-2022 at 08:15 PM.
|
03-15-2022, 09:21 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
That's ... that's too many puzzles. Put some puzzles back.
|
03-15-2022, 10:07 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
For those about to Javascript :
Comments ...
Quote:
If someone could go back in time and smack the inventor of JavaScript with a clue-by-four, that'd be great. Just sayin'.
|
Quote:
They did. What we got is what he managed to make with that concussion.
|
|
03-15-2022, 11:20 PM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
PHP: a fractal of bad design
Quote:
I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there.
You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes.
You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways.
You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever.
And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And there’s no clear problem with the set as a whole; it still has all the tools.
Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.
That’s what’s wrong with PHP.
|
Quote:
PHP is built to keep chugging along at all costs. When faced with either doing something nonsensical or aborting with an error, it will do something nonsensical. Anything is better than nothing.
|
__________________
|
03-16-2022, 06:48 PM
|
|
Solitary, poor, nasty, brutish, and short
|
|
|
|
Re: Sudokle
Confession: I tried this before, but it kept blacking out what I thought were right answers, so I flounced and didn't say anything because I thought it was probably just me being dumb, which everyone already knows.
Anyways, I tried it again today and it didn't do that, so I guess it wasn't me. I don't have anything productive to add, but I like it so far.
(Except that the partial solution really helps. It just felt like a trudge starting out with nothing because you have to start out by making a bunch of wild guesses until it's more filled in.)
|
03-16-2022, 09:20 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Flouncing is a valid and respectable response to things like that.
Also, coming back and trying again is a respectable thing too.
|
03-16-2022, 09:50 PM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
Sudoffle Alpha #2
⬛ 5
🟨 13
⏲️ 7m6s
Sudoffle
I've made the new ones fairly easy with lots of green starting clues and no yellow starting clues. If it's working right, you'll all get the same puzzle till midnight UTC, and then it should change to a new one shared by all.
Still lots of things to fix, I know.
But I'm taking a day off tomorrow to go fly my model planes.
__________________
|
03-16-2022, 10:31 PM
|
|
puzzler
|
|
Join Date: Aug 2004
Location: UK
|
|
Re: Sudokle
Regarding Javascript: I just snapped a photo of some of my JavaScript books. Notice which one is the smallest?
__________________
|
03-16-2022, 10:46 PM
|
|
Solipsist
|
|
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
|
|
Re: Sudokle
Sudoffle Alpha #2
⬛ 1
🟨 14
⏲️ 8m5s
Sudoffle
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 02:00 PM.
|
|
|
|