Vision for Community Puzzles - 1.5 years later

In the current edition of my AI4Games course, which lab is mainly based on CodinGame, I decided to put more accent on puzzles - not only multiplayer games. As there were no classic puzzles satisfying my needs, I decided create my own (A* exercise, Minimax exercise, MCTS exercise). And I was hit by everything I remember inconvenient when trying that activity last time, probably a year ago. Sadly, I just realized that many issues were already pointed out and foreseen by @player_one in a 1.5 years old topic: link.

Thus, I decided to share my feelings, thoughts, and ideas of improvements. Of course Iā€™m very interested how these things Iā€™m pointing out are seen by the rest of the CG community. I structured the post so the sections correspond to the life cycle of a puzzle: creating, validating, and finally and hopefully - solving.

Creating

Itā€™s probably the most straightforward one. Interface for making puzzles is sometimes a painful copy-paster but it is mainly OK (although I wonā€™t complain on some ā€œupload form xmlā€ option; adding test cases between the existing ones isnā€™t the most user-friendly operation under the Sun).

However, there are some simple (as one might think) things that impossible to do when writing a puzzle. The most trivial and important one is inserting hyperlinks. The choice is either to make people google for the phrase (but the common reviewing point is that there should be some link), or put plain link as text, which looks ugly, unreadable, and requires copy-pasting to actually use the link.

The second point concerns image insertion. It is probably more complex to add, but really - a picture is worth a thousand words - and this will be very useful feature for the more complex puzzles. I know ASCII art is fancy, but not always the most readable.

Last, and most complex, improvement proposition repeats my idea from the previously-mentioned topic. Allow us to make interactive puzzles! This is not SPOJ, this is CodinGame. Community puzzles will always be boring because they lack graphics that is so crucial in official puzzles - is making them fun. At least, give users the power to send programs as validators. Programs that can converse with userā€™s programs. This is the scheme used by most official puzzles and this is the other reason it distinct such game-like tasks from simple and boring output-checking tasks. The interactivity that gives game-feel is really important here. Also - this will allow to implement more interesting puzzles and in less ā€˜artificialā€™ way. Consider my Minimax puzzle - whatā€™s the point of alpha-beta if I have to read all the leafs? No point at all. Itā€™s just the best way I found to make the puzzle given current limitations. Situation with MCTS puzzle is even worse.

Validating

Reviewing process sounds great - really. On paper it shines. In practice itsā€¦ not working well, euphemistically speaking. However I donā€™t have any clear recipes, I just observe the flaws. I wonā€™t focus on CoC puzzles because a) they are handled better as they are simpler, b) it is not an interesting case from my point of view.

One thing I know and strongly suggest to be fixed is acceptance/rejection ratio not visible right on the puzzle. Now we have to click puzzle, and then click dots to know what the values are. Which is incomprehensible and inconvenient. Also one have to click play to know who validated the puzzle, and I still have no idea how to check who refused it. (Notifications are the other thing, they do not remain with the puzzles, after month, two months and so on.) I wouldnā€™t mind puzzle/CoC filtering but thatā€™s a minor suggestion.

The problem is that there are around 80 puzzles in the queue, some more than 1 year old that are mostly in a limbo state. No one is patient enough to solve them and approve them, no one is brave enough to reject them. The idea of community rejection/acceptance is good. There are even some really minor xp points to gain, but still it seems it is not motivating enough - or, alternatively, not clear enough how to make the reviews.

If I donā€™t like the puzzle, it doesnā€™t necessarily mean Iā€™m rejecting it. I often feel like I do not have background to throw it to the bin right away. And probably multiple reviewers feel the same so the puzzle stays untouched. On the other hand, there are some puzzles I know are good, but itā€™s too much work to make a working solution and I have no time, so I wonā€™t accept them. Even If I do, waiting for the remaining two approvals can take months!

Itā€™s easier with clashes because they are smaller. But with community puzzles? I have to make my own solution that takes time equal of solving other unsolved community puzzle. Then inform the author about my propositions of improvements / found errors etc. Then wait for him to response - if he still cares, and some authors are not. An alternative, is dumping into someoneā€™s contribution and changing it without his approval. As old versions are not stored, it does not seem as a nice behavior. Also, I should know all existing (>160) community puzzles to be able to spot a duplicate. (Just a note that existence of tags would simplify the process, as that would allow to make beam search through the list of accepted puzzles.)

So assume I solved the puzzle, I have to make a verdict. That is problematic because of the lack of clear criteria. I know everything is subjective, but really: ā€˜original enough + nicely themedā€™ make no criteria at all. Whatā€™s the global policy? Accept as many puzzles as possible? Accept the ones that teach something useful? Only hard ones? At the end all of them are threated the same, so all this thinking is pointless. Ironically, imho it will be easier to accept ā€˜hard puzzleā€™ or ā€˜easy puzzleā€™ then just ā€˜puzzleā€™. At least we would more clearly know what is expected of us (I meand the reviewers).

Solving

When opening community puzzles page, you are thrown over the bag of more than 160 puzzles. And you know that newest are first. In theory there are some user grades, but: a) they are meaningless, b) nearly all of them have 4 stars (the rest have 5 stars). Why meaningless? Given a grade, do you know the puzzle is easy/hard? No. Do you know it is teaching something important? No. You just know that some (not all) of the users that finished this puzzle liked it. Whatever that means for them. You even donā€™t have access to your ā€˜friendsā€™ grades.

OK, but we have number of people that solved the puzzle. That gives some intuition towards easiness but: except the cases when puzzle is new, or is easy but long and boring, or the statement is vague, or is long forgotten on the bottom of the list, or whatever.

My point is, there should be some tagging system. If we are here to train ourselves and learn, what is expected is a mechanism consistent with the one of classic puzzles. Tags pointing out the topic covered. Difficulty measured by ā€˜expertsā€™, hopefully influencing XP gain. Some of the community puzzles are hard, interesting and should have assigned appropriate rewards. Some has difficulty of the CoC tasks.

Tags and difficulties should also go in hand with some mechanism of filtering/sorting the puzzles. Also, given the number of puzzles, some more achievements should be very appropriate (solve 50 community puzzles, solve 100, solve 10 hard - given existing tag system, etc.)

Summary

To summarize. As there are no new classic puzzles (why?), community puzzles are the ones that support growth of the ā€˜practiceā€™ subpage. And because they are not evolving, they are decaying. There are not that fancy because of no graphic, and no interactivity. There is too many of them, and too diverse in difficulty and teaching potential, to be threated as an unordered list without any sorting/filtering. Citing @player_one prediction, now we have ā€œhaphazard list of hundreds of random puzzlesā€. Also the reviewing process is slow, unreliable and unclear in its goals.

Iā€™m very interesting about your feelings: authors, reviewers, solvers. And CG team - as this situation is actually not new - what plans do you have to support this half(!) of CodinGame-based activities?

15 Likes

I cannot agree more that it needs the ability to attach images to puzzles. An image is worth a thousand words. It can simplify ā€œwall of wordsā€ descriptions into a few nice short paragraphs and make the puzzle eye-catching to stimulate attempts.

Ranking of puzzles by number of submissions, number of members submitted solutions, success rate, etc. can automatically rank the difficulties of puzzles. Puzzles can be interactively sorted by these stats. By the way, I think Community Puzzles should be more difficult than CoC. I target to solve an average puzzle in a few hours, some may need a few days for research. Keep the 5 to 10 minute solutions to CoC.

It will be helpful for puzzle setters if there are more transparent criteria and procedure of approval. Letā€™s know what kinds of submission are preferred and what are discouraged. Let the community know how they can help in the screening or validation procedure. Then, you will get many more helping hands.

The community puzzle section is my most favorite content in CodinGame. It is updating frequently and with a wide variety of coverage that the frozen official puzzles cannot catch up.

2 Likes

I love Community Puzzles too butā€¦
why can I see the authorsā€™s solution when I click on ā€œVIEW CONTRIBUTIONā€ ?

Because you can fully edit his contribution (including the tests) so you should be able to edit the code too.

Thank you @aCat for taking the time to reflect on the Community Puzzles section, and others for contributing to the discussion. I donā€™t know what weā€™ll do about it yet, but itā€™s definitely in our priorities (with the community contestS) for the CG platform. You all know that weā€™re also working on the Tech.io platform and also on our B2B platform (which enable us to live), but weā€™ll work on improving CodinGame too.

So please continue to give ideas, I read all comments and discuss it with the team after.

Without talking about plans, I guess the first steps would be to add filters/tags and then working on the whole validation process since we have now around 300 pending contributions.

Iā€™m just a small potato so my voice probably doesnā€™t mean much, but being able to provide interactivity would be a huge bonus. Current ā€œmain puzzlesā€ gains a lot from visualizing the process of the running code: When Iā€™m playing The Bridge and I see the bikes fall off, I can identify the procedure and know that we screwed up, and thereā€™s something in there I have to fix. When Iā€™m solving Army Ants and I get ā€œCoiGdmnaeā€ instead of ā€œCodinGameā€, WHAT?!

It doesnā€™t even matter if itā€™s graphical anymore, I think we can all imagine a much more simple version of There Is No Spoon 1 in community puzzle form where you have to print out the nodes as a bunch of lines. You get:

00
0.

And you have to print out precisely:

0 0 1 0 0 1
1 0 -1 -1 -1 -1
0 1 -1 -1 -1 -1

Not getting a graphical output is, well, not bad, itā€™s not impossible to visualize it to some degree of correctness, even if itā€™s a nuance. Not being able to print in whatever order you want means youā€™re now forced to map nodes in a specific order, thatā€™s not too bad, even if itā€™s annoying. However not having the interactivity and having your program terminated at exactly the line you screwed up means youā€™ll lose that much time trying to figure out what went wrong. Itā€™s frustrating!

Result: "1 0 1"
Expected: "1 0 -"

(While weā€™re at this, this is just painful:)

Result: Nothing
Expected: Nothing

I get that itā€™s difficult to give the most relevant message ever, so showing you your output and compare that to the results directly does work well. But a lot of these community puzzles are really hard to understand considering the criteria can be quite convoluted (I have just finished a puzzle where the text was encoded by taking some letters in strings and shifting them forwards, different letters and then backwards, and reversedā€¦).

I think community puzzles shouldnā€™t be treated as a ā€œPlan Bā€ citizen for those who donā€™t want to tackle the main puzzles, but that they should act as a complement. A lot of the community puzzles are a joy to figure out, but because itā€™s tied to a ā€œget 100%ā€ system, thereā€™s not much to do beyond ā€œsolve it lolā€, where as main puzzles could introduce elements around a mechanic, and propose new ā€œpuzzlesā€ and ā€œtrapsā€ to force the user to improve their algorithm to handle edge cases. This is especially well demonstrated when you look at Power of Thor 2 - You get monsters and a generous amount of attacks, the amount of attacks are no longer generous, you gotta move, you gotta spin them around. Interactivity enables intuitive puzzles delivered in a progressive way. A community puzzle that attempts to ā€œstep up the difficultyā€ would probably not be as successful in its delivery, considering youā€™re expected to reach the optimal algorithm from the start. (And you wonā€™t be rewarded for reaching progression milestones.)

TLDR: I wish there were more interactivity on these. I donā€™t know if what Iā€™m looking for is more community contests or interactive puzzles interface, I donā€™t know how expensive it is to maintain something like this, and I definitely canā€™t say for certain that I think such a feature would be successful in competing with other existing puzzlesā€™ for the usersā€™ time. But itā€™s something nice to think about. By the way, being able to create your own multi puzzles sounds fun, I wonder if that will become a priority after this first Community Contest.

1 Like

To all moderators of puzzles/coc genuinely interested in reviewing pending contributions: what do you think about these contributions-related notifications?

To others, I understand that itā€™s just a pain (and I agree).
We discussed before about an option to deactivate these notifications, but if noone is interested in these, Iā€™d prefer that we just remove them.
Any idea for a kind of notification which will occur less often but will stir the curiosity towards contribution moderation?

I like and follow the ones for community puzzles. Moreover, Iā€™d actually like one more for puzzle submission, and no 24-hours grace ā€œinformation lossā€ period at all for approvals and refusals.

Iā€™d like the CoC ones.to die in fiery hell.

1 Like

My thoughts exactly. :slight_smile: I completely ignore all CoC notifications and delete them on receipt. I keep around the puzzle ones as a to-do list: ā€œOh, someone looked at this puzzle. Maybe Iā€™ll take a look too.ā€

  • danBhentschel
1 Like

I welcome these notifications, including rejecting, accepting, or having comments added, etc. Having options to select/deselect Puzzle | CoC related posts is fine. I know my favorite can be very different from many other people.

1 Like

I find notifications very useful, they give me hint what people thinks is unequivocal/interesting to review.
The CoC/Puzzle filter will be great though. However there are some other general issues:

  1. Why I do not get notifications about puzzles I already validated/rejected? It seems weird.
  2. There is no distinction between normal validation and accepting validation (same with rejection). Maybe the message should be something ā€œXX validated (2/3) YYY puzzleā€
  3. Going back to list of pending puzzles, lack of information which one I validated/rejected is also annoying. One can donā€™t remember after a long time. (It is a special and more detailed case of one of my initial points of main page acceptance/rejection balance info.)

While weā€™re on topic with notifications: theyā€™re implemented as JS-bound DOM event handlers instead of plain old HTML hyperlinks. So we canā€™t get a link out of them, or open in new window, private window, new tab.

This makes them completely unusable, for example, in an IDE tab where, no, I donā€™t want to leave without submitting my code, I donā€™t actually want to leave that tab at all, and now I clicked I canā€™t even have the notification stay ā€œactiveā€ but itā€™s too late to repair. Why even have a notification area there if it canā€™t be usable?

4 Likes

If possible, I would like Official puzzles and Community Puzzles be downloadable as pdf, and best to include test cases in it, to help preserving and printing on paper for carry-around amusement.
Having a printer-friendly version of html is also fine.
Some puzzles need a longer thinking time than coding time. Having the puzzles on paper I can do the thinking anywhere.

Is it possible to have a menu somewhere where we can list the contributions we have upvoted/downvoted and validated/refused?
Iā€™d like also that the refused puzzles/CoC go in limbo (we can still see them) instead of hiding them permanently. Why not a two-step validation process? First, a proposed puzzle/CoC is in limbo then, if three moderators validate it, itā€™s in the the second stage. Three other moderators might return it back in limbo or validate it definitively. A puzzle can oscillate between limbo and the second stage but once a moderator accepted or refused a puzzle once, he can not refuse nor validate anymore.

1 Like

Here are some enhancements that I thought of when I contribute/help contribution.
I also found this 1-year-old topic which deals with contribution sorting.
This other 1-year-old topic deals with interactive puzzles. It would be sooo good to have them.

For a contributor:

  • When writing a draft, the formatting is not applied. You have to submit it as non-draft before you see the formating.
  • Itā€™s strange to have the button to test it in an IDE only on edition mode (well, it can make sense, but itā€™s different from when the puzzle is submitted).
  • The contribution guidelines are outdated.
  • Monospace strings leads to a block. It is not possible to have it inlined.
  • Allow more than 1000 characters in the output. (The limit is 10000 for the input)
  • Allow URLs (but I understand it may be dangerous)
  • Allow images (but I understand it may be dangerous)
  • For the stub generator:
  • Allow writing constants (numbers, texts, maybe maps or lists)
  • (I found something that made sense but was not accepted, but I canā€™t find it anymore)

For a moderator:

  • Pending puzzles list page:

  • See if you have already approved (green āœ“) or refused (red āœ—) a puzzle so that you know you donā€™t need to come back.

  • Have a mark telling how much approvals/refusals have been done.

  • Separate CoC from CP puzzles.

  • In a puzzle page:

  • Have a better indication of the type of the puzzle. The only way currently is a faint gray text over a gray background, at the top, hidden as soon as you descend in the comments, an the section ā€œGame modeā€ which is present or not.

  • In a puzzle IDE:

  • If it is a CoC, allow switching to ā€œReverseā€ mode. Activating the Test cases in a modal window is not easy.

  • It would be good to test the tests first, then the validators. This would allow testing if a validator covers something the test cases donā€™t.

Yeah, I know itā€™s Christmas soon :slight_smile: :evergreen_tree: :gift:

4 Likes

Thank you @arglanir for the useful and constructive feedback. I hope you donā€™t mind that I moved your post to this thread which seems appropriate.

Weā€™re currently working on our tools to create community contests. Improving the section of community contributions is part of our priorities (along with improving our emails). I canā€™t promise anything yet, but Iā€™ll keep you updated.

Thank you. The current notification system is the only way to know where other moderators have approved/refused contributions, so it could stay as long as another visual information is not available.

Hello, I see all suggestions for improving community puzzles have been posted here. Most of my opinions have already been expressed, but Iā€™ll still mention some of the ones I would really like:

  1. Mention difficulty of a puzzle, and what we will learn.
    [Thanks a lot to Nicola, who religiously does this :slight_smile: ]
  2. Have a community suggested xp for the puzzles. Everyone who accepts must suggest a suitable xp for solving the puzzle.
    [Again, this is susceptible to misuse, so keep limits]
  3. Sort puzzles in the community puzzles page (like aCat mentioned) in order of difficulty.
  4. Add a discussions page for each puzzle.
    [Maybe this already exists, but I have never come across it :confused: ]

My opinion might not stand for much, but I do hope that one day, codingame will implement these changes :slight_smile:

3 Likes

Weā€™ll soon add difficulty and tags to community puzzles.

For existing puzzles, difficulty will be based on the success rate of the puzzle and there wonā€™t be any tags. They can still be edited by those who have the rights (level > 29).

Weā€™re also planning on merging community puzzles with all classic puzzle (from CG), ie in the ā€œpracticeā€ section.

3 Likes

Where is your AI4Games course? It sounds interesting. Iā€™ve bookmarked your puzzles to try them later.