Friday, February 25, 2011

Treasure Code Lite is live on the Blackberry

Hi!
I am excited to announce the arrival of Treasure Code Lite on the Blackberry OS! Since the release of Treasure Code in January this year, I have been working on getting a lite version for all those phones out there to try out.

This version has ALL the features, no ads and no expiration date. So it is a great way to get a feel for the user interface.

The only difference from the full version is that you don't have access to Levels 4-9, which, once you're comfortable with the game, become a great extension to Level 3.
To all those who have downloaded it already in its debut, THANK YOU. Please take a moment to get used to the UI before reviewing, and also email me for support if you are confused by the game or have ideas for improvements.

I can be reached by email me at treasurecode [at] gmail [dot] com

-Simon

Wednesday, February 23, 2011

Treasure Code Gameplay Examples: Level 6

In this game play example, we will look at Level 6.

I originally designed Treasure Code around this difficulty level: with 8 colors and 6 gems in the combination, it makes for a good challenge, while keeping it sane.
I'll try to use fewer screenshots in this walkthrough, since it will prove a long one!

In this screenshot, I've gone ahead and submitted my first guess, using the suggested set of colors.

I got [/,/] meaning two of the colors are in the combination but in the wrong spot.

That also means 4 of the colors in the first guess are not in the combination, so this is a lot of information for a first guess.

As my second guess, I chose [r,o,v,v,v,v] and got [X,/].
Here I used the fact that the first guess had no strikes to my advantage:
Since I again chose red and orange for the first two spots (as they are in the first guess), they can only have contributed to the spare in the result from guess 2.
So, the strike must come from one of the violet gems in positions 3-6.
We don't know which position violet is in yet, but that's a good piece of information to have.


Guess 3: [-,r,r,r,v,v]. Notice that I used a blank here. In this case it is mostly for emphasis, but using blanks can be very helpful (pressing backspace / delete clears out a gem).

The result was [/,/].
If we compare this to the result from our previous guess, the most obvious change is that the strike is gone. Since we determined earlier that one of the violet gems was responsible for the strike in guess 2, you can conclude that we moved the violet gem from its correct spot with our 3rd guess:
A violet gem must therefore be in position 3 or 4.


 To find out which one, we use our fourth guess: [r,r,v,r,r,r].
Why do we use red instead of using blanks?

By putting red everywhere else we are also testing something else out: whether red exists in the combination.

As it turns out, the answer is no: there is only one spare, which has to be due to the violet gem being in the wrong spot.



"There are no red gems"
That means:
1. There are no red gems.
2. A violet gem is in the 4th spot

I proceeded to mark this information at that time.

Also:
3. There are exactly two violet gems (since guess 3 had two spares and none of those could have come from the red gems)
4. Two violet gems means there are also no orange gems (since guess 2 had a strike and a spare, which had to come from the two violet gems)

5. There is a violet gem in either position 1 or 2 (since the strike in guess 2 was the violet in the 4th spot, and the spare means the other violet gems are in the wrong spot)

Our fifth guess verifies some of our knowledge.
Two strikes means we were right about a violet gem in position 4, and one in position 1 or 2.

Notice that I hadn't yet realized the 4th point (that there are no orange gems), since I could have used that knowledge to try green gems instead of orange gems to get information on the number of green gems in the combination.

For my 6th guess, I try [y,v,p,v,y,y]. Since I know from guess 1 that yellow is not in position 3, I put a yellow gem in all other available positions 1, 5 and 6.
This means that if a yellow gem is present, it should provide a strike.

The pink gem in position 3 is a "feeler" guess, to see if we get lucky.

The result: [X,X,/], two strikes and a spare. Since the yellow gem would have had to provide a strike, it can't be part of the solution, and the pink gem is also not in position 3.

In other words:
6. There are no yellow gems, and there is at least one pink gem (not in position 3).

In my next guess, I use the same technique I used with the yellow gems but now with the teal gem:
Knowing that the teal gem (if present) is in not in position 5, I put my new "feeler" guess for the pink gem to that position.
Three strikes!
From 6), we know that there is at least one pink gem, which means there are no teal gems, and that the pink gem is correctly in position 5:

7. There are no teal gems.
8. There is a pink gem in position 5.

Our next guess locks in the three gems we know about and since we only don't know about three remaining gems, we can be a little more aggressive.

Since we don't know how many pink gems there are (we always just used one, there could be more), we can try one in the first or 6th position (we know already from guess 6 that a pink gem is not in the 3rd position). By putting a green gem into the remaining two spots we will also be able to find out how many green gems there could be and whether they are in the right spot.


We got 3 strikes and 2 spares!

Since we already have accounted for our three strikes, this means that the 2 spares are from the two green gems and the pink gem we added.

Advanced:
This also tells us that there is only one green gem and at least one more pink gem.
Rationale: Assuming there are two green gems and no pink gem means that both green gems are neither in position 1 or 3. But that would mean they would both be in position 6? Not possible.

Instead, we find out a pink gem isn't in position 6, and that a green gem isn't in positions 1 and 3.
9. A pink gem is in position 1 (since it wasn't in position 3, 6 and positions 2, 4 and 5 are accounted for).
10. A green gem is in position 6 (since it wasn't in position 1, 3 and positions 2, 4 and 5 are accounted for).


(As I was playing, I didn't realize 9), so my next guess could have been better...)

Looking back to guess number 1, we know there should be two colors within [r,o,y,g,t,b], since there were two spares.
Since we've ruled out red, orange, yellow and teal, we're left with green and blue from that initial guess.

So I tried a blue gem in position 1, which retrospectively has to be a spare (since a pink gem is in position 1 and we know there's at least one blue gem and there can't be two green gems).

Interestingly enough, if we put all the pieces together after our 8th guess, we should have been able to determine the combination from the information we collected (Hint: at least one blue, pink in position 1, green in position 6).

Since I hadn't quite done that, I proceeded with guessing [b,v,g,v,p,g] and getting 4 strikes and one spare.

At that point, I realized that there wasn't more than one green gem and therefore that the pink gem was indeed in position 1.

Lastly, I realized:
11. The blue gem was in the wrong position and needed to be in position 3

With that information we have our combo:
pink,violet,blue,violet,pink,green

To confirm...


So there you have it... level 6 completed within 10 tries in this case, with two more guesses to spare!

Tuesday, February 1, 2011

Treasure Code Gameplay Examples

Hey all Treasure Code fans!

As promised, I'll begin posting some tips / tricks I picked up after my many many MANY rounds of playing on the subway.

I figured I'd start with some gameplay examples for beginner, intermediate and advanced levels. Later on I will try to share some tips and tricks for the harder levels.

Beginner: Gameplay Example: Level 3


I guess this is where I invite you to share your feedback / suggestions for what you would like covered. Thank you.

Treasure Code Gameplay Examples: Level 3

Level 3!

This is a fun level that gives your mind a little exercise in logical reasoning. For those who don't know, as the name implies, level 3 involves having to guess the combination of 3 gems. With 6 possible colors and repeating gems that means there are 6*6*6 = 216 possible combinations.


The starting screen for Level 3 looks like this.
As you can see, you begin with three colors suggested for you: red, orange, yellow or [r,o,y].
I have found that it is a very good first guess to "span the colors" in your first guess to get an idea of what colors are in the combination, and if there are any duplicates.
There is no right or wrong way to use your first guess, of course!


[r,o,y]  yielded a skull and crossbones. This means
the combination can't have red, orange or yellow
Here I got a skull and crossbones for my first guess, meaning none of the gems are in the combination. At first, that might seem like a bad thing, since your guess was way off. However, this actually tells you a lot because you now definitely know the combination does not have red, orange or yellow in it.
In math terms, you have reduced your "solution space" from 6*6*6 = 216 to 3*3*3 = 27 possibilities!

So, now that we know we're looking for a combination of green, teal and blue gems, we could try green, teal, teal, i.e. [g,t,t].
The result was [X,/], a strike and a spare. The strike means we got one color in the right spot, and one color in the wrong spot.
There is a lot you can learn from this result as well! The first thing I notice is that teal has to be in the solution. How?
The green gem can only either be the spare or the strike, but it can't be both! So whatever the green gem was, one of the teal gems had to account for the remaining spare or strike (or both if green is not in the combination).

For advanced players, a more subtle piece of information is apparent. The result tells us that the solution can't begin with green, e.g. it can't be [g,x,x]. How can one figure that?
Start by assuming the solution does begin with green. Then the strike would have come from the green gem. So then one of the teals would be the spare, right? If the teal gems in the second and third spot are not strikes, then teal should be in the first spot. But... that's the spot you assumed green to be in! So green can't be there!

There are still many guesses we can make from here. I decided to guess: [t,g,g] since:
a) we know green is not in the first position
b) we know teal is in the combination
c) I want to check if green is in the combination

As you can see, we got a single strike. Because we determined earlier that teal is in the combination, the one and only strike has to correspond to the teal gem. This also means we know the combination starts with teal, e.g. [t,x,x]

Since it's sometimes hard to keep all this information in our head, we can use the Treasure Code's features to jot down some notes (this especially helps if you save the game and need to come back to it later).

In the game's menu, there are two options that can help: Exclude Choices, and Solution Notes.

In the following screenshots, I demonstrate how I go about excluding the green gem and marking the teal gem in the first position as being part of the solution.

I exclude the green gem using the Exclude Choices dialog box and scrolling up on the green gem. Similarly I select the teal gem in the first position using the Solution Notes dialog box.

We could do the same for red, orange and yellow, but at this point we're almost there, and the notes are for you: they are not required to win the game.

Returning to the game, we know so far that the solution starts with teal and that green is not there. Before we proceed with our next guess, let's take a moment to look back at our previous guesses now that we have a little more information. It sometimes pays to look back to earlier guesses: in this case, our second guess definitely can give us a little more information this time around:

1. There have to be at least two teal gems in the combination, to account for the spare and the strike, since there is no green.
2. We know it can't be purely teal, or else there would have been two strikes, so [t,t,t] can be ruled out.


Since the only other color we haven't tried is blue, we know blue has to be in the combination, and that there is only one. That narrows the solution space down to only two options: [t,b,t] or [t,t,b].

If you followed this line of reasoning, congratulations! It takes some getting used to.

The remaining guesses are really just to see which of the two possibilities it is. And we have plenty of guesses (5) remaining!

Let's try [t,b,t]...

Looks like that one wasn't it. But it confirms our suspicion! [t,b,t] gave a strike and two spares. The blue in the second spot is wrong, and the teal in the 3rd is wrong, which would indicate they're swapped, just as we expect.

For completion, let's verify the solution is indeed [t,t,b]...







Whew, that would have been embarrassing if it wasn't right...

I hope this walkthrough was helpful, feedback is always encouraged. Thank you for reading!

Saturday, January 29, 2011

Treasure Code is live on the Blackberry

Hi!

I am excited to announce the arrival of Treasure Code on the Blackberry OS! It has been a  year in the making, and I am happy to finally be able to share my enthusiasm for this puzzle version of Mastermind with the rest of the Blackberry users in the world.

To all those who have downloaded it already in its first week, THANK YOU. I will follow up with tips and tricks on this wonderful game very soon.

For any support questions, feel free to email me at treasurecode [at] gmail [dot] com

-Simon