topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday July 14, 2020, 8:58 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Deductoid puzzle game  (Read 23224 times)

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Deductoid puzzle game
« on: January 15, 2008, 04:16 AM »
Hey folks,

DonationCoder has very kindly agreed to host a page for me which will hold some of the software I have written in my spare time. I hope you like it - the first upload is called "Deductoid" and is a simple logic puzzle game.

Deductoid_320.jpg

The link's here: http://timns.dcmembers.com/

Thanks,

timns
« Last Edit: January 16, 2008, 05:36 AM by timns »

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #1 on: January 15, 2008, 02:29 PM »
Ok, I was being dumb. Here's the link to my page: :-\

http://timns.dcmembers.com/

Thanks!

timns

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,289
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Deductoid puzzle game
« Reply #2 on: January 15, 2008, 06:33 PM »
beautiful looking program by the way! trying it now :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,289
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Deductoid puzzle game
« Reply #3 on: January 15, 2008, 06:50 PM »
Just wanted to report it's pretty darn fun when you get the hang of it  :Thmbsup: :Thmbsup:
And very nicely done.

It's hard! (at least for me) -- i'm playing only 4x4.

Question (i may have more):
Am i supposed to be able to solve every puzzle without getting any hints getting any clues or making any mistakes?
Or is part of the game the expectation that you will make some mistakes but you are going for a high score?

There is one thing that i find i wish it could do:

When you play a game like minesweeper, which is also a "constraint-based" logic puzzle, you are able to temporarily try things by marking tiles, without actually committing to your choice.

With deductoid, every click you make is absolutely final -- you see immediately whether you are right or wrong and and basically you are told the correct answer if you got it wrong.  That makes it not quite as fun as it might be otherwise i think.  just my 2 cents.

but having said that, i'm quite enjoying it  :Thmbsup:
« Last Edit: January 15, 2008, 06:52 PM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,289
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Deductoid puzzle game
« Reply #4 on: January 16, 2008, 12:12 AM »
wow i just realized that the "clue" button just tells you a logical move you can make based on the current info..
clicking it repeatedly shows me that, contrary to what i originally thought.. maybe it really is possible to solve every puzzle without doing any guessing.. if so, thats phenomenal and very cool.

which leads me to another question.. if indeed it is always possible to solve every puzzle without guessing, using just the available clues.. how did you code it so that is the case?

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #5 on: January 16, 2008, 02:06 AM »
Thank you very much for the feedback.

Yes, every puzzle can be solved purely from the clues shown!

The trick is to get used to what the clues really represent - you often need to re-check certain clues once another tile has been discovered.

The puzzles are created using an approach that I thought up myself, although not saying I'm the first person in the world to come up with it!

It's a bit tricky to explain, but here's the gist:

First select the tiles which represent the final solution, and store in a linked list. This list is shuffled around so that each clue, when created, tends to reference tiles in different rows/columns, for extra confusion ;-)

Then simply create a randomly selected type of clue to connect each tile with its neighbour. This guarantees the puzzle is always solvable without guessing. To make life harder I have a second loop around to see if any clues are superfluous, or can be combined.

All-in-all the generator is about 400 lines of Delphi, and is reasonably generic: I wrote another game using a similar algorithm which I'll post shortly if anyone is interested.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,289
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Deductoid puzzle game
« Reply #6 on: January 16, 2008, 02:14 AM »
well my enjoyment of the program has gone up significantly since i realized that each puzzle can be solved without any guessing.  very very cool stuff  :up:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,289
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Deductoid puzzle game
« Reply #7 on: January 16, 2008, 05:14 AM »
I beat an 8x8 medium! yes!! (2 mistakes due to be overanxios :()

WARNING !!! THIS GAME IS ADDICTIVE WARNING !!!

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #8 on: January 16, 2008, 05:15 AM »
 ;D ;D ;D

It sure is a fun game! Took me a bit to understand exactly how it works, but it's really fun :)

Just a suggestion: You might add a "wrong guess" limit, like 1 or 2 ;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,289
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Deductoid puzzle game
« Reply #9 on: January 16, 2008, 05:25 AM »
yeah it's fun to learn tricks and strategies.

spoiler tip
a major breakthrough i had was when i realized that the vertical clues (at the bottom) are useful for excluding possibilities not just choosing them. in other words if clue says A is above 1, and you have a non-A, then you can exclude 1.


TPReal

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 129
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #10 on: January 24, 2008, 04:06 AM »
Wow! That's a really good game! It's nicely done, and, what is most important is that the solution is always deterministic. I'm really impressed! :Thmbsup:

One bug I have found is that once some cell is solved, you can still right-click on this value in other cells, and select it as a possibility for other cells in the same row. This should not be possible.

Also let me suggest a small change, which, I feel, would make the gameplay a little better:

I'd prefer the game to allow me to right-click wherever I want, even if my choice is wrong. Only left-clicks should count as mistakes. Another change that would have to go along with this, is that if there is only one (say) Lion remaining on the board (because I right-clicked all the others), it should not automatically become my final choice (I mean, it should not automatically get left-clicked, as it gets now). I should have a chance to select another Lion and unselect this one, and finally, when I'm really sure that the choice is right, I would left-click the Lion to commit it to the cell. Then, if I'm wrong, I would get a missclick info.

One reason for this suggestion is that it would be a solution to this:
When you play a game like minesweeper, which is also a "constraint-based" logic puzzle, you are able to temporarily try things by marking tiles, without actually committing to your choice.

With deductoid, every click you make is absolutely final -- you see immediately whether you are right or wrong and and basically you are told the correct answer if you got it wrong.  That makes it not quite as fun as it might be otherwise i think.  just my 2 cents.

Another reason is that if now you want to right-click some image but you have a muscle tick or something :) and you accidentally click its neighbour, you might 1. get a mistake penalty, whereas a chance to correct your muscle tick would be more fair, 2. get an unfair piece of information, because if your right-click was a mistake, then surely... And then you either left-click this image and know that this was simply unfair, or try to ignore the fact that you know it is the correct image for this cell; both possibilities being a little spoilers.

Now it also happens sometimes that I just right-click some image, and there is a chain reaction of images getting automatically selected. I'd prefer to left-click them at my own pace, hiding unnecessary clues as they get used, and so on, and not suddenly waking up with a completely different board than it was a moment ago :)

I must learn for an exam at the university, but one must know what is important in life and what is not. The exam must wait now :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,289
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Deductoid puzzle game
« Reply #11 on: January 24, 2008, 04:14 AM »
One bug I have found is that once some cell is solved, you can still right-click on this value in other cells, and select it as a possibility for other cells in the same row. This should not be possible.

are you sure this is true? my experience is that once you solve a cell, it eliminates this image from all horizontal compatriots.  i don't think i have experienced your bug.



you made the same basic point as me about letting the user "experiment" and try moves that might be wrong, and not telling them, just so they can realize their error later.

however i feel obliged to say that, after playing the game more.. i might be willing to withdraw my request for this if it's anything more than a 5 minutes addition to the code.  the reason i say this is, as you learn how to play and get some experience, you RARELY make a mistake or ever have to guess.  As you said, the cool thing is that there is always a solution and there is NO guessing required and there is always a move you can make given a single clue.  this is a key difference with a program like minesweeper, because it means you never have to try a sequence of multiple moves before you find a problem -- there is always an exact move you can make to eliminate something based on one clue, so there is no real reason to have to experiment once you understand the rules and get the hang of it.

TPReal

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 129
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #12 on: January 24, 2008, 04:35 AM »
One bug I have found is that once some cell is solved, you can still right-click on this value in other cells, and select it as a possibility for other cells in the same row. This should not be possible.

are you sure this is true? my experience is that once you solve a cell, it eliminates this image from all horizontal compatriots.  i don't think i have experienced your bug.

Yes, it does eliminate them, but you can turn them on again by right-clicking the place where they were. And it leads to some more buggy behaviour:
Start a new game, left click randomly in cell X until you get a right answer, then turn the image back on in cell Y by right-clicking on it, and then right-click some other image in cell Y (if you get a message, click another), and the whole cell will suddenly get solved.



Well, you're right that the ability to experiment is not that necessary here. But I must say I feel uncomfortable with the program when I know that my mistakes are irreversible :) And also it's the matter of the first impression of the program - it seems very "severe" at first, before you learn how to play it. But I agree if it's a lot of work, maybe it isn't worth it.

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #13 on: January 24, 2008, 04:40 AM »
Some interesting points folks, thank you for the discussion.

Mr Real, by gum, you're right about that bug - I found the location of my lion, and sure enough I can make him appear again in the other columns by right-clicking in the space where he was. At the very least I'll get that one fixed, and I'll see what it would take to implement your other suggestion - I'd hate to be accused of being too severe  :-[



timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #14 on: January 24, 2008, 05:25 AM »
Ok, the right click bug is fixed - I just uploaded the new build which you can get from the updated link on my page:

http://timns.dcmembe...ductoid_1_4_6_27.EXE

Well-spotted there!

TPReal

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 129
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #15 on: January 27, 2008, 01:31 PM »
Hello.

Let me point out one more improvement you could make to the program :) When you play 10x10, it's hard not only to recognize the images on the board, but also the images on the clues, so they should also be zoomed when the zoom option is on. It would help a lot, I think, and shouldn't be very hard to program.

I also think that maybe you could give less clues? I think almost always some clues are redundant, it would make the game more difficult and interesting especially if you removed some of the < > clues, if possible. Just an idea :)

TPReal.

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #16 on: January 27, 2008, 03:16 PM »
The zoom suggestion is a good one, I should certainly do that.

In terms of removing clues - I will take a look. It may be a bit tricky to achieve but is worth a try. I'm away this week but as soon as I get home I'll fire up and see.

Lastly: I really appreciate your feedback!

drjdcollins

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #17 on: February 06, 2008, 03:58 PM »
Looking at the screenshot I would appear to have been playing this game everyday for more than 10 years. Unfortunately it is called SHERLOCK see http://www.kaser.com/sherwin.html

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,009
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #18 on: February 06, 2008, 04:41 PM »
Looking at the screenshot I would appear to have been playing this game everyday for more than 10 years.

10 years is quite a long time to spend solving a puzzle  ;)

Yes, I've played Sherlock, and even have the port for my PocketPC. But I'd have to say that the games do have slightly different flavors, with timns's being superior in some ways.

suleika

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 117
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Deductoid puzzle game
« Reply #19 on: February 06, 2008, 07:06 PM »
I'm just getting the hang of how it works and I like it, but...

When I (accidentally) scroll with my middle mouse wheel, the program suddenly scrolls through the levels (4x4, 5x5 etc), and my current game is reset!  Even if this depends on where my focus was (and after experimenting I don't think it does) it is disconcertingly unpredictable and annoying.

Your manual download and the DC don't actually cover all the same ground.  You've missed off the "is not next to" in the pdf manual, which threw me.

But I read both help guides and worked it out, and I am enjoying it.  Thank you for the game.

Edited to hide my previous nonsensical stuff behind spoiler tag (I had momentarily mistaken the "is not next to" for the "is between" symbol).

Spoiler
I just came across something I don't understand (in game 5).  In the online DC guide, under "is not next to" it says "This clue tells you that the two tiles shown are not in adjacent columns in the grid"  But in this game there are three tiles in this clue, in the horizontal row section (see screenshot below).

« Last Edit: February 07, 2008, 05:15 AM by suleika »

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #20 on: February 07, 2008, 01:08 AM »
Right, I'll take a look at disabling the scroll wheel (or maybe try to make it do something more constructive)

The "is not next to clue" only ever involves 2 tiles, but I draw it in that way to hammer home that (in the example) the blonde lady cannot be on *either* side of the surprised smiley, i.e. not-next-to-at-all-in-any-way, if you see what I mean.

I originally drew it as 2 tiles, but it confused people by making them think that maybe she could be on the other side of him, i.e. she's only-not-on-the-left.

I hope that makes sense! Plus 3 tiles fits in neatly with the other clues!

I must update the pdf - the first version I wrote did not have that clue. Someone who played suggested I add it, and having looked at Sherlock I imagine that's surely where the suggestion came from. My original inspiration was from a game I used to play on the Commodore 64 (showing my age here) called something like Cerebro.

timns

steeladept

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #21 on: February 07, 2008, 01:09 AM »
Took me a while to get it until I realized it was the same as the Einstein game I found a while back...may have even been here that I found it.  Don't remember.  It is, indeed, quite addicting.  However, I find that CluGrid is more likely to make me curse you out for taking away more time from my job, er, I mean free time...  ;D

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #22 on: February 07, 2008, 01:26 AM »
Took me a while to get it until I realized it was the same as the Einstein game I found a while back...may have even been here that I found it.  Don't remember.  It is, indeed, quite addicting.  However, I find that CluGrid is more likely to make me curse you out for taking away more time from my job, er, I mean free time...  ;D

Another one! Well I sure hope my version has something new to offer. And thank you for the kind comments about CluGrid. I *think* that's something no-one has done before except on paper. Please see my comment in the CluGrid discussion - we'll expand that game over time to include a bigger variety of subjects.

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #23 on: February 07, 2008, 02:52 AM »
When I (accidentally) scroll with my middle mouse wheel, the program suddenly scrolls through the levels (4x4, 5x5 etc), and my current game is reset!  Even if this depends on where my focus was (and after experimenting I don't think it does) it is disconcertingly unpredictable and annoying.

Ok, the mouse wheel is now ignored. New version uploaded if you wish to grab it!

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Deductoid puzzle game
« Reply #24 on: February 07, 2008, 07:54 AM »
Ok ladies and blokes, I just uploaded a new build of Deductoid which zooms those hard-to-see horizontal clues for those Iron Men (and Bronze Ladies  :-[) who play in 9x9 and 10x10 mode.

This was a neat suggestion from Mr TPReal, who is clearly an Iron Man himself. Thank you. Plus you get to see my lovely fast smoothed bitmap zoom er... thing.

timns