Psychic Deducer
Posted: Sun Dec 07, 2014 9:00 am
Fellow programmers, if you're looking for frenetic action containing gorgeously explosive eye candy, then this is not the game for you. I offer you no smoothly zooming or fading menus, no professional voice acting, no ear soothing music, no powerups, no medals to earn, and absolutely no unlockable content. Not a single shiny, glowing, or see through button. Although a long time programmer, I am not accomplished in graphic design, computer animation, or music composition. As a result I went for a minimalist implementation, so that I could focus on the game's design. Containing a dirt simple interface, Psychic Deducer can be considered entertainment only by those who take pleasure in thinking. That probably includes most of you. Intellectually inclined people such as college seniors pursuing a Bachelor of Science, or anyone who is psychic, might find it to be an enjoyable diversion.
Mainly because my parents gave me MATTEL's Lie Detector Game back in the day, I'd never played HASBRO's Clue until this past October. I found myself rather intrigued with the basic deductive activity that is at the core of Clue. However, I felt the dice throwing and moving pieces around the board was a rather pointless addition to the gameplay. In my opinion a detraction, but I'm sure that many would disagree. The cynical in me presumes the dice throwing based pawn movement was included in Clue so that it would play more like a boardgame. I also didn't much like the objects (characters, weapons, and rooms) that were used in the deductive (murder solving) process. My idea of using an "animated" combination lock with three tumblers was a wee bit harder to mentally keep track of, so I decided to go with combining familiar, easy to remember, yet diverse and more politically correct objects (colors, shapes, and numbers) which could easily be mentally mapped to the Clue paradigm for those so experienced.
The game can be played using only a gamepad controller, and the best way to interact with Psychic Deducer is when reclining or laying in bed while using a gamepad. Deducing from this position may allow the user to perceive the solution's vibrations more easily.
The game includes a factor lists editor*, which can be accessed when playing on the expert level. When playing on novice level, the factor lists are automatically maintained for you, so there is little need for any note taking. The artifical intelligence opponents maintain their factor lists using the same data accumulation and deduction method used for the novice player's lists.
The Psychic Deducer program was designed to support networked play in a future release. This initial version was created to implement and optimize the AI routines, and to provide a platform for people to develop and practice a game strategy while waiting for the networked version.
Because the AI has no psychic ability, I had to design algorithms to implement effective strategies to analyze the factors revealed by the other players in order to make sensible guesses.
I may have done such a good job that some players will feel that the AI cheats. That is the main reason why I implemented the post game review, so that you may examine the AI factor lists used during its decisions. From the post game review screen (shown below) one can also examine the game's guess history. Even with all of that available, it is impossible for you to determine that every AI guess is honest without seeing the program's source code. My response to that would be for you to wait for the networked version, and play that with two trusted friends. I will state for the record that no AI peeking of the solution ever happens. In my opinion releasing a game that includes cheating computer AI would be stupid and create bad karma.
I just played a game where the AI beat me in three rounds. During the game I was trying very hard to use my psychic powers, and I had guessed the yellow and diamond in the third, and was working on the digit. Being comfortable with numbers, I usually go with the flow, and seem to do OK.

I had just (unknowingly) missed the solution by one, but still feeling very positive about my progress.... when.... BAM!!
I know it sounds crazy, but that AI win was very disconcerting for me. It was such a concentration disruptor that for a moment I thought... dare say even wondered, if somehow the AI was cheating and had looked at the answer!!! Yep, crazy. I know. But understand human nature. Then I realized that it happened because I was playing against the novice AI, something that I had not been doing much while developing the expert AI level, and I wasn't used to the behavior. The novice AI makes a lot of random guesses, and sometimes it even gets lucky!
Overall the expert AI will win more than the less logical novice AI. Both levels of AI opponents can win on any round, although it would be less likely for the expert AI to win in the first round than the more randomly guessing novice AI. For the longest, I mistakenly believed that the expert AI was incapable of winning in less than three rounds, and I figured that I was going to need to change it to make it play more realistic. However when it won in two rounds I had to closely re examine the algorithms to find that, if *everything* went right, it was indeed possible for the expert AI to win in two. I then added code to increase the possibilities for the expert AI to win in two rounds or less by tweaking it to allow deviation from the normal rigid algorithm that made it impossible to have a first round win, by allowing a first round random guess from the possible solution factors. The first round random guessing will occur 50% of the time the expert AI has five factors of each type remaining in the possible solution factors. When that first round guess happens there is a 1 out of 125 (1/5³) chance for it to match the solution. A subsequent round random guess can also occur 33% of the time it has four factors of each type remaining in the possible solution factors.
The Psychic Deducer factor lists editor is simple to use, and saves on printer ink and paper. The factor lists editor is operated by using the keyboard's four arrow keys, or a gamepad's D-PAD.
> DOWN moves the focus to the next lower level, or changes the data in the lowest level.
> LEFT/RIGHT changes focus to the previous/next item on the level.
> UP moves the focus up one level.
To have a decent chance of keeping up when playing on the expert level, I need to use the factor lists editor or a cribsheet. Only the most intelligent of smart people can effectively play on the expert level without some sort of note taking. I know that my brain does not work well enough to remember everything needed to make the logical deductions for guesses good enough to win when playing on the expert level.
Also included in the game zip are two cribsheets for you to print, should you desire to use something other than the factor lists editor to keep track of the information while playing. One version of the cribsheet is to be used with pencil or pen, while the other version is to be used with colored pencils, markers, or crayons. The chat messages can also be used to take notes in conjunction with, or in lieu of, using the factor lists editor or a cribsheet.
NOTES:
The top scores table and persistent game attributes are automatically saved into and loaded from a file named "psydedata". Besides the top scores, saved are the player's name, the three difficulty level settings, and the game's audio volume level setting. As you develop a winning strategy, if it is difficult for you to win because the AI is too smart, it can be disabled, but that setting is not saved in the "psydedata" file.
The gamepad D-pad is mapped to the arrow keys.
The gamepad button 10 (START) is mapped to the Escape key.
Gamepad buttons 1-9 are mapped to the down arrow key.
All frontend input commands (keystrokes) will be displayed in the frontend menus until the first game is finished.
When playing as a novice, that occasional popping sound is a factor deduction that's being applied to your lists based on an AI validation or invalidation of a guess.
The Linux version will look best when using the font UnDinaru, included in UBUNTU 13.10.
The Windows® version will look best when using the Corporate Rounded (Regular) font.
So send me with a PM if you want me to email you the BETA version of Psychic Deducer which represents 5 weeks 6 days of PureBasic programming. The zip is less than 1/2 megabyte. At this point, no bugs AFAIK. What I need is feedback about knowing how it runs on the newer flavors of Windows and Linux, and about any problems that you might encounter. I want to email v1.0 to my people for Christmas, and I do not want the embarassment or hassle of a v1.1 release.
*Notetaking
One reason the game is enjoyed by many ages and skill levels is that the complexity of notetaking can increase as a player becomes more skillful. An amateur may simply mark off the cards he has been shown; more advanced players will keep track of who has and who does not have a particular card, possibly with the aid of an additional grid. Expert players may keep track of each suggestion made, knowing that the player who answers it must have at least one of the cards named; which one can be deduced by later events. One can also keep track of which cards a given player has seen, in order to minimize information revealed to that player and/or to read into that player's suggestions.
Mainly because my parents gave me MATTEL's Lie Detector Game back in the day, I'd never played HASBRO's Clue until this past October. I found myself rather intrigued with the basic deductive activity that is at the core of Clue. However, I felt the dice throwing and moving pieces around the board was a rather pointless addition to the gameplay. In my opinion a detraction, but I'm sure that many would disagree. The cynical in me presumes the dice throwing based pawn movement was included in Clue so that it would play more like a boardgame. I also didn't much like the objects (characters, weapons, and rooms) that were used in the deductive (murder solving) process. My idea of using an "animated" combination lock with three tumblers was a wee bit harder to mentally keep track of, so I decided to go with combining familiar, easy to remember, yet diverse and more politically correct objects (colors, shapes, and numbers) which could easily be mentally mapped to the Clue paradigm for those so experienced.
The game can be played using only a gamepad controller, and the best way to interact with Psychic Deducer is when reclining or laying in bed while using a gamepad. Deducing from this position may allow the user to perceive the solution's vibrations more easily.
The game includes a factor lists editor*, which can be accessed when playing on the expert level. When playing on novice level, the factor lists are automatically maintained for you, so there is little need for any note taking. The artifical intelligence opponents maintain their factor lists using the same data accumulation and deduction method used for the novice player's lists.
The Psychic Deducer program was designed to support networked play in a future release. This initial version was created to implement and optimize the AI routines, and to provide a platform for people to develop and practice a game strategy while waiting for the networked version.
Because the AI has no psychic ability, I had to design algorithms to implement effective strategies to analyze the factors revealed by the other players in order to make sensible guesses.
I may have done such a good job that some players will feel that the AI cheats. That is the main reason why I implemented the post game review, so that you may examine the AI factor lists used during its decisions. From the post game review screen (shown below) one can also examine the game's guess history. Even with all of that available, it is impossible for you to determine that every AI guess is honest without seeing the program's source code. My response to that would be for you to wait for the networked version, and play that with two trusted friends. I will state for the record that no AI peeking of the solution ever happens. In my opinion releasing a game that includes cheating computer AI would be stupid and create bad karma.
I just played a game where the AI beat me in three rounds. During the game I was trying very hard to use my psychic powers, and I had guessed the yellow and diamond in the third, and was working on the digit. Being comfortable with numbers, I usually go with the flow, and seem to do OK.
I had just (unknowingly) missed the solution by one, but still feeling very positive about my progress.... when.... BAM!!



I know it sounds crazy, but that AI win was very disconcerting for me. It was such a concentration disruptor that for a moment I thought... dare say even wondered, if somehow the AI was cheating and had looked at the answer!!! Yep, crazy. I know. But understand human nature. Then I realized that it happened because I was playing against the novice AI, something that I had not been doing much while developing the expert AI level, and I wasn't used to the behavior. The novice AI makes a lot of random guesses, and sometimes it even gets lucky!
Overall the expert AI will win more than the less logical novice AI. Both levels of AI opponents can win on any round, although it would be less likely for the expert AI to win in the first round than the more randomly guessing novice AI. For the longest, I mistakenly believed that the expert AI was incapable of winning in less than three rounds, and I figured that I was going to need to change it to make it play more realistic. However when it won in two rounds I had to closely re examine the algorithms to find that, if *everything* went right, it was indeed possible for the expert AI to win in two. I then added code to increase the possibilities for the expert AI to win in two rounds or less by tweaking it to allow deviation from the normal rigid algorithm that made it impossible to have a first round win, by allowing a first round random guess from the possible solution factors. The first round random guessing will occur 50% of the time the expert AI has five factors of each type remaining in the possible solution factors. When that first round guess happens there is a 1 out of 125 (1/5³) chance for it to match the solution. A subsequent round random guess can also occur 33% of the time it has four factors of each type remaining in the possible solution factors.
The Psychic Deducer factor lists editor is simple to use, and saves on printer ink and paper. The factor lists editor is operated by using the keyboard's four arrow keys, or a gamepad's D-PAD.
> DOWN moves the focus to the next lower level, or changes the data in the lowest level.
> LEFT/RIGHT changes focus to the previous/next item on the level.
> UP moves the focus up one level.
To have a decent chance of keeping up when playing on the expert level, I need to use the factor lists editor or a cribsheet. Only the most intelligent of smart people can effectively play on the expert level without some sort of note taking. I know that my brain does not work well enough to remember everything needed to make the logical deductions for guesses good enough to win when playing on the expert level.
Also included in the game zip are two cribsheets for you to print, should you desire to use something other than the factor lists editor to keep track of the information while playing. One version of the cribsheet is to be used with pencil or pen, while the other version is to be used with colored pencils, markers, or crayons. The chat messages can also be used to take notes in conjunction with, or in lieu of, using the factor lists editor or a cribsheet.
NOTES:
The top scores table and persistent game attributes are automatically saved into and loaded from a file named "psydedata". Besides the top scores, saved are the player's name, the three difficulty level settings, and the game's audio volume level setting. As you develop a winning strategy, if it is difficult for you to win because the AI is too smart, it can be disabled, but that setting is not saved in the "psydedata" file.
The gamepad D-pad is mapped to the arrow keys.
The gamepad button 10 (START) is mapped to the Escape key.
Gamepad buttons 1-9 are mapped to the down arrow key.
All frontend input commands (keystrokes) will be displayed in the frontend menus until the first game is finished.
When playing as a novice, that occasional popping sound is a factor deduction that's being applied to your lists based on an AI validation or invalidation of a guess.
The Linux version will look best when using the font UnDinaru, included in UBUNTU 13.10.
The Windows® version will look best when using the Corporate Rounded (Regular) font.
So send me with a PM if you want me to email you the BETA version of Psychic Deducer which represents 5 weeks 6 days of PureBasic programming. The zip is less than 1/2 megabyte. At this point, no bugs AFAIK. What I need is feedback about knowing how it runs on the newer flavors of Windows and Linux, and about any problems that you might encounter. I want to email v1.0 to my people for Christmas, and I do not want the embarassment or hassle of a v1.1 release.
*Notetaking
One reason the game is enjoyed by many ages and skill levels is that the complexity of notetaking can increase as a player becomes more skillful. An amateur may simply mark off the cards he has been shown; more advanced players will keep track of who has and who does not have a particular card, possibly with the aid of an additional grid. Expert players may keep track of each suggestion made, knowing that the player who answers it must have at least one of the cards named; which one can be deduced by later events. One can also keep track of which cards a given player has seen, in order to minimize information revealed to that player and/or to read into that player's suggestions.