Group Abstract Group Abstract

Message Boards Message Boards

Code puzzles: turning docs into educational games

POSTED BY: Vitaliy Kaurov
11 Replies
Posted 8 years ago

I’ve made educational games for nearly twenty years, games that share most of the properties you list, Vitaliy, as advantages of Bug Hunter. Here are my observations about Bug Hunter:

  1. Eye candy does not make games better. Zombies, space ships, etc. are fun to make and pleasing to look at, but they do not make a game fun or playable. (My experience is with high school teens; I may be wrong when it comes to young children.) A good game has a balance of intellectual challenge, chance, and playability. This is the opposite of what most people believe about games. As you develop Bug Hunter, I recommend steering away from the artificial player-versus-bug analogy and just let the player demonstrate mastery.
  2. Humans love scores. If I’m playing a game, I want to know whether I beat my previous score, bested my buddy, or even made it into the top ten on the leaderboard. In fact, that may be my primary reason to play. Perhaps that’s coming for Bug Hunter. The one-and-done nature of the game right now seemed lacking.
  3. Mining the docs for your game content is a brilliant idea. After I played seven rounds, I felt like the formula isn’t quite right yet. For example, one question had “MapThread” missing and I incorrectly tried “Riffle.” That’s it. I lost. I looked at the MapThread[] docs, but I didn’t feel like I could use it or even identify it next time. Perhaps the game could show what my attempt would output so I could compare it to the correct output. Even better, perhaps the game could allow me to keep trying multiple times, each time showing me what my output would be (and perhaps lowering my score).
  4. I do agree that there should be some sort of indication where the missing piece goes in the string, maybe a colored rectangle or some other graphic.

As I look back on what I have written, it seems a little negative. I don't mean it as such. I think the game is a great idea with vast potential. I'm looking forward to the next iteration.

POSTED BY: Mark Greenberg

@Mark thanks a lot for the consideration and comments! Here are a few responses:

Eye candy does not make games better. Zombies, space ships, etc. are fun to make and pleasing to look at, but they do not make a game fun or playable. (My experience is with high school teens; I may be wrong when it comes to young children.) A good game has a balance of intellectual challenge, chance, and playability. This is the opposite of what most people believe about games. As you develop Bug Hunter, I recommend steering away from the artificial player-versus-bug analogy and just let the player demonstrate mastery.

This is just a prototype. What I was going for with the thing you call "eye candy" is a hint of storytelling. I mostly agree with your comment, but in a sense that good storytelling is not essential, but adds to the excitement. I think if wisely executed it could add to the desire to play more. A good example is http://codemancergame.com written by an avid WL user. Of course there is no story in a picture of a bug. But it is a placeholder for it ;-)

Humans love scores. If I’m playing a game, I want to know whether I beat my previous score, bested my buddy, or even made it into the top ten on the leaderboard. In fact, that may be my primary reason to play. Perhaps that’s coming for Bug Hunter. The one-and-done nature of the game right now seemed lacking.

Yes, gamification is the true essence of these things. It should be in the game. I said that at the end among improvement points: "Flexible scoring system based on function usage frequencies."

3 & 4

Yes, agree absolutely, thanks for the feedback!

POSTED BY: Vitaliy Kaurov

This is great! I'm an adult beginner myself, with no formal training in programming. What I continue to find the most challenging aspect of learning the WL is the syntax. You have to get up to speed with the syntax, and quickly, or much of the docs, and most of the great examples shared here won't be comprehensible. This is also why, as much as I enjoyed working through the exercises in SW's new EIWL textbook, I feel that it still places too much emphasis on covering functions and not enough (and not soon enough) on syntax. I've tried out BugHunter a few times and haven't encountered an example yet that removed the 'sugar'. So I agree that allowing a user to pick different areas or themes for testing (for example, 'quiz me on syntax', 'quiz me on functions related to network analysis' etc.) would be a good choice for an initial enhancement.

Thank you for making this!

POSTED BY: Arno Bosse

Great points, @Arno, I will take these in account when improving the app. Add yes "sugar syntax" cases are a bit rare, I will work on that too.

POSTED BY: Vitaliy Kaurov

Hello @Vitaliy Kaurov

I enjoyed playing your Bug Hunter web app. The code and the thought process behind this application is brilliant. I did not know the Legacy Animations Documentation pages existed. Its a very nice and intuitive way of presenting it to users.

I got a similar idea at Wolfram Summer School 2016 and built a simpler prototype. Link: http://community.wolfram.com/groups/-/m/t/886715 . Its called Infinite Coding Problems Generator in Wolfram Programming Language. I used templates and loaded a CSV file that contains questions from EIWL book.

Your web app is so much fun and its giving me new ideas for improving my prototype. These educational applications has tremendous potential and spikes the learning curve in students. I like to see your app growing big like http://challenges.wolfram.com.

Thank you

Try my web app here: https://wolfr.am/e0t5Zn50 enter image description here

POSTED BY: Manjunath Babu

This is some great work @Manjunath Babu! Could you explain to me briefly here, how did you handle the correctness check? Was it a verbatim-check of the code? In Wolfram Language often different versions of code yield correct result, this is why we call it multi-paradigm language. For example:

data = RandomReal[1, {100, 2}];
ListPlot[data]
Graphics[Point[data]]

Were you taking that into account?

POSTED BY: Vitaliy Kaurov

Hello @Vitaliy Kaurov ,

I haven't taken Random Functions into account yet.

JSON Template looks something like this:

[
{
        "Number": "11.2",
        "Question": "Make a single string of the whole alphabet, in upper case.",
        "Answer": "`Function`[StringJoin[Alphabet[\"`Alphabet`\"]]]",
        "Template": "Make a single string of the all `Alphabet` alphabets, using `Function`.",
        "Data": {"Function": ["ToUpperCase", "ToLowerCase"], "Alphabet": ["French","Russian", "Italian", "English","German"]}
    },
    {
       "Number":"1.3",
       "Question":"Multiply the whole numbers from 1 to 5.",
       "Answer":"Times @@ Range[1, `Number`]",
       "Template":"Multiply the whole numbers from 1 to `Number`.",
       "Data":{"Number": "RandomInteger[{5,10}]"}
    },
    {
       "Number":"4.1",
       "Question":"Make a bar chart of `Number`.",
       "Answer":"`Function`[`Number`]",
       "Template":"Make a `Function` of `Number`.",
       "Data":{"Function":["BarChart3D","BarChart","PieChart","PieChart3D","ListLinePlot"],"Number":"RandomInteger[50, 4]"}
    }
]

To check for correctness, I execute the originally solution expression and execute the user provided answer expression. If these two match, then its correct.

Since Wolfram Language is a symbolic language, it just compares at the lowest level of both executed expressions.

However, the problem with this approach is, This prototype doesn't work with Random Function. Since Random function will store the final answer in different values at the lowest level.

POSTED BY: Manjunath Babu

I think there also could be some problem with sorting functions. If the goal is to return a list of elements independent of their order, some approaches may return them in different order. Then SameQ will not match.

POSTED BY: Vitaliy Kaurov

The idea is fresh and new. However, I am afraid, if the kids would really love to play it. The illustrated examples appears all low level errors, which could be detected and assisted by WL grammar color system easily.

In future, the kids are very very very smart. That means they would become boring very quickly either. If we want those kind of projects get to work, we should design it really playful. Maybe, we should ask and test with kids.

POSTED BY: Frederick Wu

@Frederick Wu thanks for taking a look and the comments.

However, I am afraid, if the kids would really love to play it.

I was actually thinking about targeting adults who are a bit above the beginner level. A few folks I tested with were adults and they enjoyed playing it. Some said that the bugs were to scary though ;-)

The illustrated examples appears all low level errors, which could be detected and assisted by WL grammar color system easily.

If I understood what you mean by "grammar color system" correctly, then even those examples I are showed in the post already undetected by it - there is no colors in front end highlighting these:

enter image description here

enter image description here

Moreover a few testers suggested I use an optional indicator to show where exactly the code is missing, --- as a hint to help the solution. I also think those cases that will trigger "grammar color system" are quite good because learners need to have a good habit and understanding how code highlighting works to catch errors during a real programing workflow.

In future, the kids are very very very smart. That means they would become boring very quickly either. If we want those kind of projects get to work, we should design it really playful. Maybe, we should ask and test with kids.

Yes, if you mean young kids, they would probably need another type of game or at least some better game-play dressing for this idea. I'd love to hear your ideas who to make this work. If you come up with anything please share.

POSTED BY: Vitaliy Kaurov

Reserved for analytics

POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard