Mental Stretch
There are possible color permutations for the options chosen.
Positions:
Colors:
Allow Duplicate Colors: yes no
How to play

Solution:

New Guess:
Colors:

History: (0 tries)

 
Instructions
Mental Stretch is a Mastermind clone; a code-breaker puzzle. You can choose your level of difficulty by selecting the number of colors and positions to use.  The goal is to deduce the code in as few guesses as possible. The code is a sequence of colors.

At the top of the game board you can select the number of positions, the number of colors, and whether to allow duplicate colors in the code. Note that if the number of colors is less than the number of positions then duplicate colors will be enforced.

The area below this is where you make your guess. There will be a number of squares (according to the number of positions chosen) with hashed backgrounds. To place a guess, you need to set a color in each of these squares and then click the "Try it" button.

If your device supports drag and drop (e.g. using mouse, finger, stylus...), then colors are set by clicking on a colored box in the area titled "Colors:" and (while holding down the mouse button) dragging it to one of the boxes in the "New Guess:" area.
If your device does not support drag and drop, then colors are set by clicking on a colored box in the area titled "Colors:" and then clicking on one of the boxes in the "New Guess:" area.

Once you have placed your guess by clicking "Try it", your guess will display in the "History:" section (sorted newest to oldest). Next to each guess in the "History:" section there will be zero or more small boxes.

A small black box means that you have a color in the correct location (it does not tell you which color or which location). So, if there are two small black boxes next to a guess, this tells you that you have two colors in the right positions (you just don\'t know which colors they are.) A small white box means that you have a correct color but in the wrong location.

The total number of possible permutations (arrangements where order matters) of colors (allowing duplicates) is colors^positions where "^" means exponentiation. Thus, for the default setting of 8 colors and 5 positions there are 8^5 = 32,768 possible permutations. For the maximum challenge of 22 colors and 20 positions there are (allowing duplicates) 22^20 = 7 x 10^26 possible arrangements! This number is larger than the number of grains of sand on earth and larger than the number of stars in the observable universe!

If duplicates are not allowed, the total number of possible permutations of colors is colors!/(colors - positions)!. So, for 8 colors and 5 positions there are 8!/3! = 8*7*6*5*4 = 6,720 possible arrangements. And for 22 colors and 20 positions there are 22!/2! = 5.6 x 10^20 possibilities!

For more information on Mastermind clones, including strategies for solving, see Wikipedia


iOS Devices

You can add the Mental Stretch web app to your iOS device:
1) Go to https://www.artbylogic.com/puzzles/mentalstretch/mentalstretch.htm in your Safari browser.
2) Tap the Share button (at the bottom of the Safari screen for the iPhone, at the top for iPad)
3) Tap the icon labeled "Add to Home Screen"
4) Tap the "Add" button in the upper right hand corner of the dialog
You can now launch the Mental Stretch 2D app from its icon on your iOS device.

Android

You can pin the Mental Stretch web app to your Android device:
1) Go to https://www.artbylogic.com/puzzles/mentalstretch/mentalstretch.htm in your browser.
2) Click the Menu button. Then add the page to your bookmarks.
3) Open your bookmarks using the menu button. Find the new bookmark you just added. Press down and hold on the bookmark until you see an action menu.
4) Select "Add to homescreen" from the action menu.
The bookmark is now pinned to the homescreen for easy access.


Enjoy!
www.artbylogic.com
 
T70e5831b9acffb4d1e52f9e8cd2a912eeea2ab276fe2f27265521115d15202f