[Community Puzzle] Simple AI duels

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @nicola,validated by @5DN1L,@LittleDarkBug and @FredericLocquet.
If you have any issues, feel free to ping them.

The puzzle doesn’t define what “dominated” means.

There are only two possible actions: C or D.
If the player made more C actions than D then C is dominating.


Oh, so it’s just about which of C and D are more common in the historical actions? I don’t think this is what dominated usually means. I think with the usual definition D dominates everything because your opponent can never beat you if you play D (C gives them a loss, D gives them a draw).

Yes, it’s about the history of the actions.

1 Like

You should probably replace it by " is more common" or something like that.
Also, you should specify “strictly more”, cause testcase 5 fails with >= instead of > (but all validators work anyway).

“>=” wouldn’t make sense. That would mean C dominates D and D dominates C could both be true simultaneously. If it were to be changed my choice of wording would maybe be to use “outnumber” or “outnumbers”. But “dominates” seems pretty straight forward.

A condition like “greater/better” can mean either “striclty greater/better” or “greater/better or equivalent”.

It might be implicit for you that it’s the first one but truth is, there is no universal rule for these things that apply in all contexts/fields/languages.

So even if it seems implicit for you, I think it should always be specified.