New Exercise Proposal: Camicia

It is a variant on the game of War, and so that is the upbeat name, others include jewels such as Strip Jack Naked and Beat your Neighbor. I think the name is probably the upbeatest of most that I have heard, if “upbeatest” is a word, and it is admittedly your request of an “upbeat” name reminding me of the pretty harsh names and nature of the game names.

This might be the choice of names that beats the other choices. :slight_smile:

2 Likes

That’s nice, it would be a great tribute to my grandmother, but it would be a variant of a variant.

I prefer War, simple, short and striking as soon as you see it.
Then we could use a green plastic soldier, like the ones in Toy Story, as the image. That would be magnificent. :wink:

It would be nice to involve the community when these decisions need to be made, with a poll or perhaps an Instagram story. (In this case, Twitter, because I don’t see any link for Instagram.)

We also need to change the Twitter logo to the X logo when someone has time.

I like Camicia

but it would be a variant of a variant.

Not a blocker. The instructions and especially the tests are the specification, not the exercise name.

1 Like

Exercism uses this forum and Discord as it’s primary social platforms. This thread is community involvement. Everyone on this thread is a community member. No Exercism staff has gotten involved yet.

ok, fair enough.

It’s not that long ago that we moved from Minesweeper to Flower Field, so Camicia would be my choice of a name. At least no violence in the headline.

I don’t know if the problem itself helps making progress in a programming language, as it looks like a really hard exercise for Exercism - like zebra. There is little or no help to develop the algorithm given by the tests - the essence of TDD is to make incremental test driven steps towards a solution. And you actually have to know a language very well already to come up with a solution.

3 Likes

Yes, unfortunately this exercise does not have a simple version to then increase the difficulty of the tests.

It will be like one of those exercises (already present on the platform) where the user is encouraged to search for a solution by Googling.

The only thing we can do is write a detailed introduction explaining the rules clearly. Then it’s all downhill from there, hopefully.

I don’t think it’s such a difficult exercise to consider Hard. It’s just a matter of recursively applying rules to sort an array at the end of the day.

My secret dream is that someone, after discovering this little problem/game, will be encouraged to contribute to research, perhaps by improving an existing algorithm or creating a new one, or even just by learning more about it through study.
For many novice users, this will certainly be a door to a new topic, it will be up to them to decide whether to open it or not. :sparkles:

The Wikipedia article doesn’t define “tricks” well. I’m trying to implement a solution but (1) my card out if off by 1/2 in 3 cases and (2) I’m not sure what counts as a trick.

1 Like

Yeah, the Square Root exercise outlines a few possible approaches and then references Wikipedia. I think that’s fine as long as we’re not biasing folks towards one particular approach in case it might not be appropriate for a given track. Practice exercises are ideally solvable multiple ways.

I’d cover the rules and maybe provide a short example game to show how the rules are applied to come up with the final result.

1 Like
  1. If you tell me which ones you can’t find, I’ll try to check them myself. Maybe I was wrong, or maybe the website was wrong.
    The first two tests are definitely correct because I tried them physically with the cards.

  2. A ‘trick’ is a round. When a round ends, the player collects the cards and places them at the bottom of their deck.

Example with small decks :

starting decks:

  • PLAYER A: "--K--J---"
  • PLAYER B: "----K----"

pile at the end of the trick:
top → "-J--K--K----" ← bottom

new decks:

  • PLAYER A: "---|----K--K--J-"
  • PLAYER B: "---"

pile at the end of the trick:
top → "------" ← bottom

endgame decks:

  • PLAYER A: "----K--K--J-|------"
  • PLAYER B: ""

the bar | serves only to divide graphically

Definitely yes

There are certainly several ways to do this, depending on the track. The easiest way is definitely to proceed as if you were playing in real life.

I have modified the file.
Kebler 1999 & Collins 2006 were wrong by 1.

Enough war happening around the world, that it does have a mental picture of something terrible, and in reality for some, even real memories.

We have people on the platform that may be doing this to get away from a little bit of daily stress. We are trying to name things in a way that might not instantly trigger anxiety to people, unnecessarily.

2 Likes
{'playerA': 'K---J----AK---J-J---------', 'playerB': '--KAQ-A-Q-----Q-K--A-Q-J--'}
4: got={'status': 'finished', 'cards': 541} != expected={'status': 'finished', 'cards': 542}
{'playerA': '---JQ---K-A----A-J-K---QK-', 'playerB': '-J-----------AJQA----K---Q'}
6: got={'status': 'finished', 'cards': 5789} != expected={'status': 'finished', 'cards': 5791}
{'playerA': 'A-QK------Q----KA-----J---', 'playerB': '-JAK----A--Q----J---QJ--K-'}
7: got={'status': 'finished', 'cards': 6913} != expected={'status': 'finished', 'cards': 6914}

I got 542, 5790 and 6913.

I also get an off-by-one on the tricks counts. It’s entirely possible my code has a bug.

» python war.py
{'playerA': 'K---J----AK---J-J---------', 'playerB': '--KAQ-A-Q-----Q-K--A-Q-J--'}
got={'status': 'finished', 'cards': 541, 'tricks': 75} != expected={'status': 'finished', 'cards': 542, 'tricks': 76}
----
{'playerA': '---JQ---K-A----A-J-K---QK-', 'playerB': '-J-----------AJQA----K---Q'}
got={'status': 'finished', 'cards': 5789, 'tricks': 804} != expected={'status': 'finished', 'cards': 5791, 'tricks': 805}
----
{'playerA': 'A-QK------Q----KA-----J---', 'playerB': '-JAK----A--Q----J---QJ--K-'}
got={'status': 'finished', 'cards': 6913, 'tricks': 960} != expected={'status': 'finished', 'cards': 6914, 'tricks': 960}
----

My solution


But yeah. Lots of maintainer input, not a ton of explicit “please do proceed” but what I’m reading as a bunch of implicit “sounds good” feedback.

+1 to using Camicia (even if the rules don’t actually match Camicia). We can use the instructions to lay out what rules to follow and the tests to validate the details.

+cc @ErikSchierboom and/or @iHiD : should we have an explicit approval from one of you before proceeding?

I see test cases but no proposed introduction or instructions for me to say “yes, I approve of a PR being made”.

@FraSanga Can you put together an intro and instructions for this?

yes, but not now. I’m at the bowling right now ahah

1 Like

While you all check if it’s okay, I’ll double-check your solution, @IsaacG