Draft
Lets play Guess Who
Loading description...
Games
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
If we're using the same set of characters and characteristics from Preloaded anyway, is there any reason to pass in
persons
intoGuessWho
? It'd imply that it's possible to only have a subset of all characters for guessing, which does not occur in the tests.Aye I did start with using the preloaded then I had an idea of some different tests where I needed to be able to change it. But those tests were insanely bad so...
In all the tests the opponent character always have
Male
characteristic for some reasons. Is this a dev exit?It's because there are more male cards so it gives the player a bit of an advantage.
It doesn't change the optimal amount of maximum guesses needed anyway, so there's no point in doing that.
What's worse, this is a hidden knowledge that artificially changes the kata's difficulty from what's stated, so it's definitely a no-go.
Lol I made a very naive assumption it seems and didnt do my calculations correctly. Turns out the difference between male and female charcteristics is 17 to 15 so a useless advantage.
The tests as they are designed right now is unsolvable, as it is unclear what a solution should optimize for: Average guesses? Minimum guesses? Maximum guesses? Number of guesses for specific match-ups?
The tests current does this:
This basically forces a solution to be implemented the same way as the reference solution, or be strictly superior to it.
Also, in any case, there exists a solution with at most 5 guesses across all possible characters (it's in fact very easy to derive it by hand), and the lower bound is 5 for obvious reasons. So this kata is basically another "optimal solution search" problem with a fixed input, like this.
Tbh that is basically what GuessWho is.
I wanted to make the computer (good one, not the dunce) actually play the game and ask valid questions but without using any strategy.
unfortunatly if not using strategy it is a game of chance and I couldnt find a way to garantuee that the Kata solver would win everytime unless they also use a rather good strategy
Any suggestions how I could allow less optimized solutions but still require more than just chance?
You can choose one of the metrics above (usually it's either average guesses or maximum guesses), depending on what you want.
You'll need to test every option to calculate these metrics anyway, so randomizing the test order is better than just choosing an element with replacement randomly every time.
I'll see if I can find a solution that still holds with my intentions with the Kata.
Kata design problem: We're required to implement the player logic correctly, running games and maintain game states, and play optimally the same time. Why are we doing 3 unrelated tasks together in one? The kata would sound like we only need to do the last one, so having to do the other two as well is very off-putting. Not to mention the current interface is ill-designed for doing this, as game, player and controller logic should belong to different objects.
I'll see if I can change the interface a bit