"Clue" Challenge

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
snoopy
DBB Benefactor
DBB Benefactor
Posts: 4434
Joined: Thu Sep 02, 1999 2:01 am

"Clue" Challenge

Post by snoopy » Thu Jul 21, 2011 9:36 am

Make a "clue" tracking program. Have a set up where you can input cards seen and each person's guesses and the responses given. For extra cool-ness, it can give real-time percentages for each possibility. For regular coolness, it can show eliminated cards, possible owners of each card, and positively identified cards.
Arch Linux x86-64, Openbox
"We'll just set a new course for that empty region over there, near that blackish, holeish thing. " Zapp Brannigan
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7127
Joined: Mon Aug 01, 2005 8:47 am
Location: Ơ̸̦͇̲̬̭̱̰͎̞͈̣͎͚̳ͬ͋̃̀̇͊͂͋͐ͦ̽ͣ̂ͥ͊̅̀̚͠ B̶͖̯͉̜̰̲̓̔͋̈́ͅ È̯ Y̪̤̼͉̠̙͝

Re: "Clue" Challenge

Post by Isaac » Thu Jul 21, 2011 11:13 am

I'll definitely will try this.
s☼-£♦и̫͍ͥ̍ͪ͌̓͗͡о̡̹̱͊̅ͮ̓̕͢б̧̝̻̪̤̳̜͐̓̉ͤ͢͜ ͙̬͙̆̑ͮ̐ͭ̾̂́͘i̎̌̾̓̽̀̈̓̀҉͉̙̦͎̘̝͕f̻͕͔̘ͣͣ̓͊̿͢͜ ͍͔͈͕̮̫ͣ̆ͮ̊͋/♂6Æ!♪╩"▲L└уͭ̂͐̇҉̴̣̼̞̠̯͓̺̞ф̜̊͌̈́̋̏̐́ц̨͔̮̿̇ ̨̛͖̙͖̖̮̗̱ͩ̆͞ͅа̥͇̞̖͚̟̅͐ͤ͞͠͠э̜̘̩̳̬͔̾ͯ̀ͫ̒̐̿ͅͅг̭̖̀ͦ̒̑ͥ̌ͮͫ͞ё͔̟̃ͬ̾̓͟ё̦̞̙̫͔̩͑̀͂ͯ̄̔̃̑̀͠ͅͅ
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6387
Joined: Sun Sep 05, 1999 2:01 am
Location: ☃☃☃

Re: "Clue" Challenge

Post by Jeff250 » Thu Jul 21, 2011 11:11 pm

I'll try to take a quick hack at this on Saturday. I saw that Wikipedia has a page on Clue... is the explanation there sufficient for the challenge and/or is there a better resource for the Clue rules?
User avatar
snoopy
DBB Benefactor
DBB Benefactor
Posts: 4434
Joined: Thu Sep 02, 1999 2:01 am

Re: "Clue" Challenge

Post by snoopy » Fri Jul 22, 2011 7:23 pm

Yes: http://en.wikipedia.org/wiki/Cluedo describes the rules and game play.

I imagine the tracking program running in two stages:

Setup:
Define the number of players
Define the cards in hand
Define first player

Gameplay:

For others' turn:
Define whose turn it is
Define suggestion
Define who showed a disproving card

For own turn:
Define card newly seen
Define whom showed the newly seen card

Ongoing status per card:

Confirmed owner, if exists
Possible owners

Possible scenarios missed by simply tracking status of each card:

In turn #1 person B shows person A either card x or y or z.
By turn #5, you have confirmed that person C possesses card y and z.
If the progression of the game is not saved, the program can't go back to re-evaluate turn #1, and conclude that card x was shown.

I'm imagining that the program would run with two sets of data:
One would be a database of confirmed owners
The second would be a record of the progression of the game.

With each turn, I envision the program updating the confirmed owner database, then re-running the progression of the game to draw conclusions from previously inconclusive steps.

In my scenerio, during the first turn the program would flag B as a possible owner of x, y, or z. Once C is a confirmed owner of x, the program would flag B and a possible owner of y and z. Once C is a confirmed owner of y, the program would flag B as the confirmed owner of z.
Arch Linux x86-64, Openbox
"We'll just set a new course for that empty region over there, near that blackish, holeish thing. " Zapp Brannigan
User avatar
Thenior
DBB Captain
DBB Captain
Posts: 667
Joined: Wed Oct 06, 2004 9:40 am

Re: "Clue" Challenge

Post by Thenior » Thu Aug 04, 2011 8:05 am

I want to try this - going to be a challenge.
User avatar
snoopy
DBB Benefactor
DBB Benefactor
Posts: 4434
Joined: Thu Sep 02, 1999 2:01 am

Re: "Clue" Challenge

Post by snoopy » Mon Aug 15, 2011 3:03 pm

My quarter ends in two weeks. I'm going to take a shot at a shell script that will accomplish this between quarters. Right now I'm up to my ears in homework/term papers.... and I'm only taking one class! (Part time graduate work while working full time is tough.)
Arch Linux x86-64, Openbox
"We'll just set a new course for that empty region over there, near that blackish, holeish thing. " Zapp Brannigan
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7127
Joined: Mon Aug 01, 2005 8:47 am
Location: Ơ̸̦͇̲̬̭̱̰͎̞͈̣͎͚̳ͬ͋̃̀̇͊͂͋͐ͦ̽ͣ̂ͥ͊̅̀̚͠ B̶͖̯͉̜̰̲̓̔͋̈́ͅ È̯ Y̪̤̼͉̠̙͝

Re: "Clue" Challenge

Post by Isaac » Mon Aug 15, 2011 3:38 pm

Just had my last final exam. I have one week before fall 2011 starts. I should have time to start this.
s☼-£♦и̫͍ͥ̍ͪ͌̓͗͡о̡̹̱͊̅ͮ̓̕͢б̧̝̻̪̤̳̜͐̓̉ͤ͢͜ ͙̬͙̆̑ͮ̐ͭ̾̂́͘i̎̌̾̓̽̀̈̓̀҉͉̙̦͎̘̝͕f̻͕͔̘ͣͣ̓͊̿͢͜ ͍͔͈͕̮̫ͣ̆ͮ̊͋/♂6Æ!♪╩"▲L└уͭ̂͐̇҉̴̣̼̞̠̯͓̺̞ф̜̊͌̈́̋̏̐́ц̨͔̮̿̇ ̨̛͖̙͖̖̮̗̱ͩ̆͞ͅа̥͇̞̖͚̟̅͐ͤ͞͠͠э̜̘̩̳̬͔̾ͯ̀ͫ̒̐̿ͅͅг̭̖̀ͦ̒̑ͥ̌ͮͫ͞ё͔̟̃ͬ̾̓͟ё̦̞̙̫͔̩͑̀͂ͯ̄̔̃̑̀͠ͅͅ
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6387
Joined: Sun Sep 05, 1999 2:01 am
Location: ☃☃☃

Re: "Clue" Challenge

Post by Jeff250 » Mon Aug 15, 2011 3:59 pm

Although I started this a while ago, I probably won't have time to finish it for a couple of weeks. Also, I started it in Haskell, which was probably a bad idea because you spend half of your time coercing the type system.
User avatar
Thenior
DBB Captain
DBB Captain
Posts: 667
Joined: Wed Oct 06, 2004 9:40 am

Re: "Clue" Challenge

Post by Thenior » Tue Aug 16, 2011 9:37 am

I'm doing it in javascript - just kind of time consuming to get all the html elements and events going.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7127
Joined: Mon Aug 01, 2005 8:47 am
Location: Ơ̸̦͇̲̬̭̱̰͎̞͈̣͎͚̳ͬ͋̃̀̇͊͂͋͐ͦ̽ͣ̂ͥ͊̅̀̚͠ B̶͖̯͉̜̰̲̓̔͋̈́ͅ È̯ Y̪̤̼͉̠̙͝

Re: "Clue" Challenge

Post by Isaac » Tue Sep 13, 2011 10:28 am

I'm going to start this. I'm getting through a bunch of mysql tutorials and school work at the moment. After that I will get on this.
s☼-£♦и̫͍ͥ̍ͪ͌̓͗͡о̡̹̱͊̅ͮ̓̕͢б̧̝̻̪̤̳̜͐̓̉ͤ͢͜ ͙̬͙̆̑ͮ̐ͭ̾̂́͘i̎̌̾̓̽̀̈̓̀҉͉̙̦͎̘̝͕f̻͕͔̘ͣͣ̓͊̿͢͜ ͍͔͈͕̮̫ͣ̆ͮ̊͋/♂6Æ!♪╩"▲L└уͭ̂͐̇҉̴̣̼̞̠̯͓̺̞ф̜̊͌̈́̋̏̐́ц̨͔̮̿̇ ̨̛͖̙͖̖̮̗̱ͩ̆͞ͅа̥͇̞̖͚̟̅͐ͤ͞͠͠э̜̘̩̳̬͔̾ͯ̀ͫ̒̐̿ͅͅг̭̖̀ͦ̒̑ͥ̌ͮͫ͞ё͔̟̃ͬ̾̓͟ё̦̞̙̫͔̩͑̀͂ͯ̄̔̃̑̀͠ͅͅ
Post Reply