Go Back   Freethought Forum > The Amphitheater > The Colosseum

Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2022, 04:53 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default 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.
__________________
Reply With Quote
Thanks, from:
Ari (03-12-2022), Crumb (03-12-2022), Ensign Steve (03-13-2022), fragment (04-02-2022), JoeP (03-12-2022), lisarea (03-13-2022), Sock Puppet (03-17-2022)
  #2  
Old 03-12-2022, 06:13 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default Re: Sudokle

Quote:
Originally Posted by JoeP View Post
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 03:05 AM. Reason: Added a comma.
Reply With Quote
  #3  
Old 03-12-2022, 06:34 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

Quote:
Originally Posted by ceptimus View Post
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".
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-13-2022)
  #4  
Old 03-13-2022, 01:54 AM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default Re: Sudokle

Quote:
Originally Posted by JoeP View Post
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?
__________________
Reply With Quote
  #5  
Old 03-14-2022, 11:55 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

Quote:
Originally Posted by ceptimus View Post
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.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
  #6  
Old 03-15-2022, 12:01 AM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

Quote:
Originally Posted by ceptimus View Post
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:
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
  #7  
Old 03-15-2022, 12:52 AM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default 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 :bleh: 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. :muttercircle:
__________________
Reply With Quote
  #8  
Old 03-15-2022, 12:58 AM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default 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.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-15-2022)
  #9  
Old 03-15-2022, 01:03 AM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default 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.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-15-2022)
  #10  
Old 03-15-2022, 09:54 AM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default Re: Sudokle

I think I fixed that bug now. :crossed:
Brain now overloaded after changing gears from PHP to JavaScript. Need coffee. :coffeeplz:
__________________
Reply With Quote
Thanks, from:
Ensign Steve (03-16-2022), JoeP (03-15-2022)
  #11  
Old 03-15-2022, 10:24 AM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default 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?
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
Ensign Steve (03-16-2022)
  #12  
Old 03-15-2022, 01:35 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

Sudokle Alpha #1

⬛ 10
🟨 73
⏲️ 188m23s

Sudokle
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-15-2022)
  #13  
Old 03-15-2022, 01:35 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default 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 :stunned: and hosts a somewhat simpler game.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-15-2022)
  #14  
Old 03-15-2022, 05:10 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default Re: Sudokle

Quote:
Originally Posted by JoeP View Post
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 :stunned: 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?
__________________
Reply With Quote
  #15  
Old 03-15-2022, 05:39 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

Yes. I would like new puzzles. I have solved the currently available puzzle.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
  #16  
Old 03-15-2022, 05:39 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

Quote:
Originally Posted by ceptimus View Post
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:ff:le.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-15-2022), Crumb (03-15-2022), viscousmemories (03-16-2022)
  #17  
Old 03-15-2022, 06:08 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default 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. :pleased:

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:ff: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 07:15 PM.
Reply With Quote
Thanks, from:
Crumb (03-15-2022), JoeP (03-15-2022), lisarea (03-15-2022), viscousmemories (03-16-2022)
  #18  
Old 03-15-2022, 08:21 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

That's ... that's too many puzzles. Put some puzzles back.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
Crumb (03-15-2022), lisarea (03-15-2022), viscousmemories (03-16-2022)
  #19  
Old 03-15-2022, 09:07 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default 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.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-15-2022), viscousmemories (03-16-2022)
  #20  
Old 03-15-2022, 10:20 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default 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.
__________________
Reply With Quote
Thanks, from:
Ensign Steve (03-16-2022), JoeP (03-16-2022), lisarea (03-16-2022), viscousmemories (03-16-2022)
  #21  
Old 03-16-2022, 05:48 PM
lisarea's Avatar
lisarea lisarea is offline
Solitary, poor, nasty, brutish, and short
 
Join Date: Jul 2004
Posts: XVMMMDXV
Blog Entries: 1
Images: 3
Default 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.)
Reply With Quote
Thanks, from:
ceptimus (03-16-2022)
  #22  
Old 03-16-2022, 08:20 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

Flouncing is a valid and respectable response to things like that. :ffnod:

Also, coming back and trying again is a respectable thing too.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-16-2022), lisarea (03-16-2022)
  #23  
Old 03-16-2022, 08:50 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default 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. :geek:
But I'm taking a day off tomorrow to go fly my model planes. :radioplane:
__________________
Reply With Quote
Thanks, from:
JoeP (03-16-2022), lisarea (03-16-2022)
  #24  
Old 03-16-2022, 09:31 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMCLIII
Images: 28
Default Re: Sudokle

Regarding Javascript: I just snapped a photo of some of my JavaScript books. Notice which one is the smallest?
Attached Images
File Type: jpg 20220316_202445.jpg (3.02 MB, 7 views)
__________________
Reply With Quote
Thanks, from:
Crumb (03-16-2022), JoeP (03-16-2022), lisarea (03-16-2022)
  #25  
Old 03-16-2022, 09:46 PM
JoeP's Avatar
JoeP JoeP is online now
Feedback loop
 
Join Date: Jul 2004
Location: Knifecrime Island
Gender: Male
Images: 18
Default Re: Sudokle

Sudoffle Alpha #2

⬛ 1
🟨 14
⏲️ 8m5s

Sudoffle
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (03-16-2022)
Reply

  Freethought Forum > The Amphitheater > The Colosseum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

 

All times are GMT +1. The time now is 04:02 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Page generated in 0.60462 seconds with 15 queries