"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: 4435
Joined: Thu Sep 02, 1999 2:01 am

"Clue" Challenge

Post by snoopy »

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: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: "Clue" Challenge

Post by Isaac »

I'll definitely will try this.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6511
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Re: "Clue" Challenge

Post by Jeff250 »

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: 4435
Joined: Thu Sep 02, 1999 2:01 am

Re: "Clue" Challenge

Post by snoopy »

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 »

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

Re: "Clue" Challenge

Post by snoopy »

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: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: "Clue" Challenge

Post by Isaac »

Just had my last final exam. I have one week before fall 2011 starts. I should have time to start this.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6511
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Re: "Clue" Challenge

Post by Jeff250 »

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 »

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: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: "Clue" Challenge

Post by Isaac »

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.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
Post Reply