6 kyu

RPS Knockout Tournament Winner

104 of 257FrankK
Description
Loading description...
Games
Algorithms
Game Solvers
Design Patterns
Object-oriented Programming
  • Please sign in or sign up to leave a comment.
  • FArekkusu Avatar

    The image in the description is dead.

  • DSchwettmann Avatar

    Very nice and simple Kata, with a bit of trial and error and a gamey sense to it. As well a, in my oppinion, very suitable description, which even points out the (relatively simple) way to complete the given task.

  • mmalkavian Avatar

    I'm a bit struggling to figure out this kata.

    1. How can you get the opponent shape? from the playground? Is it the one from current game or previos game? So far, we are able to get only the outcome-til-20 and exposing the playground API didn't help much.

    2. The name setOpponentShape and the void return type are quite misleading.

    3. A typical workflow in pseudo-code would be much more helpful.

    4. How can I win a completely random game with some non-random strategy? Do you have different types of bot opponents? Do I need to risk losing the first matches of the 20 to figure out if the opponent is following a pattern?

    Many things are not clear.

    • mmalkavian Avatar

      I've skipped the solution out of curiosity.

      My personal opinion about this kata without spoilering too much:

      1. a poorly-defined description and a wasted potentially good idea;
      2. yes, as I suspected you did make some sort of basic bots with which you need to waste a lot of time (and code submissions which are not too quick for Java in Codewars) to get their strategies, the names of the opponents are not casual; the name I give myself is instead irrelevant;
      3. yes, I was right about setOpponentShape: not only is misleading, you don't even use it! Another irrelevant thing of the kata.

      IMHO, this kata is too much a "guess what was in the author's mind".

      Just my 2 cents.

      Question marked resolved by mmalkavian 9 years ago
    • FrankK Avatar

      This comment has been hidden.

    • FrankK Avatar

      This comment has been hidden.

    • mmalkavian Avatar

      OK... I've irritated you with this kata... Sorry for that!

      ahah! nothing personal :)

      Ad 4. There are different bot opponents with different strategies. But the same opponent always uses the same strategy. If you adapt in the right way to each of your opponents, you can win the tournament with a very near 100% chance, although you do not always need to win with 20-0. The best way to solve this kata is to get each time the shapes returned of 1 opponent (getShape and setOpponentShape) and study the patterns.

      My suggestion is to mention this in the description: there are some named bots with their relative strategies and you need to lose a bit of times to figure them out. I initially thought it was all random, the playing style and the names too.

    • FrankK Avatar

      :)

      Thanks for your suggestion... I will use it to make the description more clear.

      Funny thing is that my initial idea was more like your thoughts but I dropped a lot to make the kata not too hard. I think it made it also less intuitive...

    • FrankK Avatar

      I changed the kata description. I hope it is better now... :D

    • smile67 Avatar

      It's much better;-)... but really little bit "strange kata", first (old description) i was thinking about where/how to get the shape of the computer-player to choose "my" correct shape to win, but nothing fits to your interface (function return values and parameters);-)... So i throwed my tablet against the wall:-)...

    • smile67 Avatar

      ...deleted (cw error, submitted twice - i often have this error?!)

  • dinglemouse Avatar

    This comment has been hidden.

    • FrankK Avatar

      Hi dinglemouse, 9 out of 10 is not enough because the final test wants you to win the tournament 25 times in a row. I will make some changes to make this clear... Gr. Frank

    • FrankK Avatar

      Thanks dinglemouse. I've changed the kata tests and its much better now :)

      Question marked resolved by FrankK 9 years ago
  • oaz Avatar

    This comment has been hidden.

  • dinglemouse Avatar

    Why is the test code forcing me to expose these variables from Player class?

    public String NameOpponent;
    public List<String> MatchResults;
    
  • dinglemouse Avatar

    Is this guaranteed winnable? It seems opponent is checking my moves same as I am checking theirs. But I am always forced to move first which puts me at a disadvantage.