Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[Adventurer] Nine Gems

This Level is not in i18n.

3 Likes

Love this level, super easy. Did not require reading the hints to pass, only logic. Never tried this puzzle before but I loved it :slight_smile:

2 Likes

I solved it with 3 moveXY :wink: I can solve it with 0 moveXY, but the referee requires at least 2.

5 Likes

You can not use more than 4 moveXY
But
Usage of

move( gem.pos );

is unlimited

So my solution
99 move + 3 moveXY
Who more :slight_smile:

3 Likes

I will enable i18n after some feedback and revisions. I don’t want to make people translate the hints/guides/etc if I wind up changing them based on testing :slight_smile:

My goal with this level is to shake loose preconceived ideas about how to solve problems, and I think that goal is achieved once you see the solution and go “Duh! Of course!” whether or not you came upon the solution yourself.

A secondary goal is to reinforce the idea that if you get stuck, you can look at the hints for help :slight_smile:

There should be a script that fires a pop-up message after about 35 seconds of the player not typing anything, that mentions the hints. So hopefully they have had some time to think about how to solve it, but aren’t yet frustrated enough to have quit the level.

I’m considering leaving out the third move hint, but I feel like some students might still get stuck there… so I’m currently erring on the side of being a bit easier, for the newer coders who may run into this (it’s linked up early in the Forest).

I hope that new players come away from the level thinking “Next time I’ll figure out the answer myself!” and are less likely to give up when they get stuck on a future level. :slight_smile:

3 Likes

Given those goals, I think it is good with a couple minor tweaks.

  1. I think the pop-up about checking hints came too quickly, I was still
    thinking through my solution when it came up. I think those that are
    struggling will be the ones that start right away, then get confused later.
    Maybe wait a minute instead of 35 seconds.

  2. Add a warning on hint 2 that the next hint gives it away, so don’t hit
    it if you want to figure it out yourself. Once I’m in the hints section, I
    don’t tend to close it til I’ve read them all.

3 Likes

I like the idea of adding a spoiler warning for hints that could potentially give away an answer. I’d much rather have at least kneaded the grey matter a little before being given the answer.

This was a fun problem to solve!

Completed with the warrior and basic items.

3 Likes

Will attempt that. Thanks :slightly_smiling_face:

How. Is. This. Possible.

2 Likes

Wonder if there’s a way to submit a patch to fix that cheat. @Bryukh
But then again the goals do not state anything about just move so I suppose that it’s not against the rules. Also this is a forest level and most forest level players do not have boots with move so maybe it was not considered in the making of this level.
Maybe that’s where the puzzle is? :stuck_out_tongue_winking_eye:

3 Likes

I didn’t use move :wink: However, I used some high-tier equipment.

3 Likes

I am having significant difficulty trying to get my code to work. I discovered a way to solve this puzzle using a single moveXY, but the code suddenly breaks after 5 gems. Is this level bugged?

My code is:

var i = 10;
while (true) {
var item = hero.findNearestItem();
if (item) {
var pos = item.pos;
var x = pos.x;
var y = pos.y;
hero.moveXY(x, y);
i -= 1;
} else {
break;
}

}

I have tried varying my code and achieved the same results.

Alternate Code:

while (true) {
var item = hero.findNearestItem();
if (item) {
var pos = item.pos;
var x = pos.x;
var y = pos.y;
hero.moveXY(x, y);

    }
  
}

Please help.

2 Likes

Read the hints. You will have to travel to a series of x,y coordinates in order to get the right angle to collect all the gems. The hints basically give it all away.

3 Likes

Thanks, I actually never saw that there were multiple steps to the hint.

3 Likes

Level can’t solved on python

1 Like

This should be fixed now. Please try again!

If it still doesn’t work, you may need to clear your browser cache.

3 Likes

Try to browse “How to connect 9 dots with 4 straight lines?” by google. If you are a sluggard.

1 Like

Please do not post final solutions. Thanks.

the code really can be solved on python, like this:

Mod edit: Hi Pablo. Welcome to Discourse but please do not post final solutions.

I noticed that when I solved the Nine Gems puzzle and pressed it only makes 8 gem jingles as it picks up the gems. At first I thought, “That’s odd.” Then I realized why. There are only 8 gems on the board at the beginning. We all assume there are 9, just as most of us assume, at first, that we need to stay within the boundaries of the square. My suggestion would be to place the hero slightly below or to the right of the first gem for the beginning position. I am new to the Forums and hesitate to open this conversation for the simple reason that the challenge level is excellent in how it forces us to think outside the box and tackle a puzzling problem similar to many we face in our programming experience. Please feel free to delete my reply rather than prolong the old conversation.

1 Like

Hi Paul and welcome to the forum!

While we’d prefer not to ‘necro’ posts, as Chaboi states, sometimes it is to better to necro, rather than have many posts on the same topic. Yours will not be deleted. The prohibition is on posting complete code that equates to a solution of a level…the object is to help folks learn, not to just copy and paste and pass a level.

All helpful input is very much welcome!