Eight Marbles Free Online Game

Designer(s)Mordecai Meirowitz
Years active1970 to present
Genre(s)Board game
Paper & pencil game [root]
Setup time< 5 minutes
Playing time10–30 minutes
Random chanceNegligible
Age range8 and up

Top 30 Best Marble Runs for Kids 2020. 1) ThinkFun Gravity Maze Marble Run Logic Game. 2) Learning Resources Tumble Trax Magnetic Marble Run. 3) Ideal Amaze ‘N’ Marbles. 4) Ravensburger Gravitrax Marble Run. 5) Marble Genius Marble Run Super Set. 6) Marble Galaxy Maze. 7) Marbulous-Translucent Marble Run. Bubble Games: Play Arkanoid-style games, show off your Zuma skills, and roll marbles through 3D levels in one of our many free, online bubble games! Pick One of Our Free Bubble Games, and Have Fun.

Mastermind or Master Mind is a code-breaking game for two players. The modern game with pegs was invented in 1970 by Mordecai Meirowitz, an Israeli postmaster and telecommunications expert.[1][2] It resembles an earlier pencil and paper game called Bulls and Cows that may date back a century.

Gameplay and rules[edit]

The game is played using:

  • a decoding board, with a shield at one end covering a row of four large holes, and twelve (or ten, or eight, or six) additional rows containing four large holes next to a set of four small holes;
  • code pegs of six different colors (or more; see Variations below), with round heads, which will be placed in the large holes on the board; and
  • key pegs, some colored black, some white, which are flat-headed and smaller than the code pegs; they will be placed in the small holes on the board.

The two players decide in advance how many games they will play, which must be an even number. One player becomes the codemaker, the other the codebreaker. The codemaker chooses a pattern of four code pegs. Duplicates and blanks are allowed depending on player choice, so the player could even choose four code pegs of the same color or four blanks. In the instance that blanks are not elected to be a part of the game, the codebreaker may not use blanks in order to establish the final code. The chosen pattern is placed in the four holes covered by the shield, visible to the codemaker but not to the codebreaker.[3]

The codebreaker tries to guess the pattern, in both order and color, within eight to twelve turns. Each guess is made by placing a row of code pegs on the decoding board. Once placed, the codemaker provides feedback by placing from zero to four key pegs in the small holes of the row with the guess. A colored or black key peg is placed for each code peg from the guess which is correct in both color and position. A white key peg indicates the existence of a correct color code peg placed in the wrong position.[4]

Screenshot of software implementation (ColorCode) illustrating the example.

If there are duplicate colours in the guess, they cannot all be awarded a key peg unless they correspond to the same number of duplicate colours in the hidden code. For example, if the hidden code is red-red-blue-blue and the player guesses red-red-red-blue, the codemaker will award two colored key pegs for the two correct reds, nothing for the third red as there is not a third red in the code, and a colored key peg for the blue. No indication is given of the fact that the code also includes a second blue.[5]

Once feedback is provided, another guess is made; guesses and feedback continue to alternate until either the codebreaker guesses correctly, or all rows of the decoding boards are full.

Traditionally, players can only earn points when playing as the codemaker. The codemaker gets one point for each guess the codebreaker makes. An extra point is earned by the codemaker if the codebreaker is unable to guess the exact pattern within the given number of turns. (An alternative is to score based on the number of key pegs placed.) The winner is the one who has the most points after the agreed-upon number of games are played.

Other rules may be specified.[6]


The game is based on an older, paper based game called Bulls and Cows. A computer adaptation of it was run in the 1960s on Cambridge University’s Titan computer system, where it was called 'MOO'. This version was written by Frank King. There was also another version for the TSS/8 time sharing system, written by J.S. Felton and finally a version for the Multics system at MIT by Jerrold Grochow.[7]

The modern game with pegs was invented in 1970 by Mordecai Meirowitz, an Israeli postmaster and telecommunications expert. Meirowitz presented the idea to many major toy companies but, after showing it at the Nuremberg International Toy Fair, it was picked up by a plastics company, Invicta Plastics, based near Leicester, UK. Invicta purchased all the rights to the game and the founder, Edward Jones-Fenleigh, refined the game further. It was released in 1971–2.[1][2][8]

Since 1971, the rights to Mastermind have been held by Invicta Plastics. (Invicta always named the game Master Mind.) They originally manufactured it themselves, though they have since licensed its manufacture to Hasbro worldwide, with the exception of Pressman Toys and Orda Industries who have the manufacturing rights to the United States and Israel, respectively.[9]

Starting in 1973, the game box featured a photograph of a man in a white jacket seated in the foreground, with a young Asian woman of high caste standing behind him with the golden symbols of office visible on her sari, denoting the power and intellect behind the throne. The two amateur models (Bill Woodward and Cecilia Fung) reunited in June 2003 to pose for another publicity photo.[10]

Algorithms and strategies[edit]

Before asking for a best strategy of the codebreaker one has to define what is the meaning of 'best': The minimal number of moves can be analyzed under the conditions of worst and average case and in the sense of a minimax value of a zero-sum game in game theory.

Best strategies with four pegs and six colors[edit]

Eight Marbles Free Online Game Play


With four pegs and six colours, there are 64 = 1296 different patterns (allowing duplicate colours).

Worst case: Five-guess algorithm[edit]

In 1977, Donald Knuth demonstrated that the codebreaker can solve the pattern in five moves or fewer, using an algorithm that progressively reduces the number of possible patterns.[11]The algorithm works as follows:

  1. Create the set S of 1296 possible codes (1111, 1112 ... 6665, 6666)
  2. Start with initial guess 1122 (Knuth gives examples showing that other first guesses such as 1123, 1234 do not win in five tries on every code)
  3. Play the guess to get a response of coloured and white pegs.
  4. If the response is four colored pegs, the game is won, the algorithm terminates.
  5. Otherwise, remove from S any code that would not give the same response if it (the guess) were the code.
  6. Apply minimax technique to find a next guess as follows: For each possible guess, that is, any unused code of the 1296 not just those in S, calculate how many possibilities in S would be eliminated for each possible colored/white peg score. The score of a guess is the minimum number of possibilities it might eliminate from S. A single pass through S for each unused code of the 1296 will provide a hit count for each coloured/white peg score found; the coloured/white peg score with the highest hit count will eliminate the fewest possibilities; calculate the score of a guess by using 'minimum eliminated' = 'count of elements in S' - (minus) 'highest hit count'. From the set of guesses with the maximum score, select one as the next guess, choosing a member of S whenever possible. (Knuth follows the convention of choosing the guess with the least numeric value e.g. 2345 is lower than 3456. Knuth also gives an example showing that in some cases no member of S will be among the highest scoring guesses and thus the guess cannot win on the next turn, yet will be necessary to assure a win in five.)
  7. Repeat from step 3.

Average case[edit]

Subsequent mathematicians have been finding various algorithms that reduce the average number of turns needed to solve the pattern: in 1993, Kenji Koyama and Tony W. Lai performed an exhaustive depth-first search showing that the optimal method for solving a random code could achieve an average of 5625/1296 = 4.3403 turns to solve, with a worst-case scenario of six turns.[12]

Minimax value of game theory[edit]

The minimax value in the sense of game theory is 5600/1290 = 4.341. The minimax strategy of the codemaker consists in a uniformly distributed selection of one of the 1290 patterns with two or more colors.[13]

Genetic algorithm[edit]

A new algorithm with an embedded genetic algorithm, where a large set of eligible codes is collected throughout the different generations. The quality of each of these codes is determined based on a comparison with a selection of elements of the eligible set.[14][15] This algorithm is based on a heuristic that assigns a score to each eligible combination based on its probability of actually being the hidden combination. Since this combination is not known, the score is based on characteristics of the set of eligible solutions or the sample of them found by the evolutionary algorithm.

The algorithm works as follows:

  1. Set i = 1
  2. Play fixed initial guess G1
  3. Get the response X1 and Y1
  4. Repeat while XiP:
    1. Increment i
    2. Set Ei = ∅ and h = 1
    3. Initialize population
    4. Repeat while hmaxgen and Eimaxsize:
      1. Generate new population using crossover, mutation, inversion and permutation
      2. Calculate fitness
      3. Add eligible combinations to Ei
      4. Increment h
    5. Play guess Gi which belongs to Ei
    6. Get response Xi and Yi

Complexity and the satisfiability problem[edit]

In November 2004, Michiel de Bondt proved that solving a Mastermind board is an NP-complete problem when played with n pegs per row and two colors, by showing how to represent any one-in-three 3SAT problem in it. He also showed the same for Consistent Mastermind (playing the game so that every guess is a candidate for the secret code that is consistent with the hints in the previous guesses).[16]

The Mastermind satisfiability problem is a decision problem that asks, 'Given a set of guesses and the number of colored and white pegs scored for each guess, is there at least one secret pattern that generates those exact scores?' (If not, then the codemaker must have incorrectly scored at least one guess.) In December 2005, Jeff Stuckman and Guo-Qiang Zhang showed in an arXiv article that the Mastermind satisfiability problem is NP-complete.[17]


Eight Marbles Free Online Game

Varying the number of colors and the number of holes results in a spectrum of Mastermind games of different levels of difficulty. Another common variation is to support different numbers of players taking on the roles of codemaker and codebreaker. The following are some examples of Mastermind games produced by Invicta, Parker Brothers, Pressman, Hasbro, and other game manufacturers:

Mastermind197264Original version
Bagels[18]197210 digits3Also played as a word game with 2- or 3-digit numbers
Royale Mastermind19725 colors × 5 shapes3
Mastermind44197265For four players
Grand Mastermind19745 colors × 5 shapes4
Super Mastermind (a.k.a. Deluxe Mastermind; a.k.a. Advanced Mastermind)1975 (in Poland - Copyright Invicta 1972 in cooperation with Krajowa Agencja Wydawnicza[19])85
Word Mastermind197526 letters4Only valid words may be used as the pattern and guessed each turn.
Mini Mastermind197664Travel-sized version; room for only six guesses
Number Mastermind19766 digits4Uses numbers instead of colors. The codemaker may optionally give, as an extra clue, the sum of the digits.
Electronic Mastermind (Invicta)197710 digits3, 4, or 5Uses numbers instead of colors. Handheld electronic version. Solo or multiple players vs. the computer. Invicta branded.
Walt Disney Mastermind197853Uses Disney characters instead of colors
Mini Mastermind (a.k.a. Travel Mastermind)198864Travel-sized version; room for only six guesses
Mastermind Challenge199385Both players simultaneously play code maker and code breaker.
Parker Mastermind199384
Mastermind for Kids199663Animal theme
Mastermind Secret Search199726 letters3-6Valid words only; clues are provided letter-by-letter using up/down arrows for earlier/later in the alphabet.
Electronic Hand-Held Mastermind (Hasbro)199764Handheld electronic version. Hasbro.
New Mastermind200484For up to five players
Mini Mastermind200464Travel-sized self-contained version; room for only eight guesses

The difficulty level of any of the above can be increased by treating “empty” as an additional color or decreased by requiring only that the code's colors be guessed, independent of position.

Computer and Internet versions of the game have also been made, sometimes with variations in the number and type of pieces involved and often under different names to avoid trademark infringement. Mastermind can also be played with paper and pencil.There is a numeral variety of the Mastermind in which a 4-digit number is guessed.[20]

The game was compiled into Clubhouse Games: 51 Worldwide Classics for the Switch under the name 'Hit & Blow'.[21]


  1. ^ abNelson, Toby (9 March 2000). 'A Brief History of the Master Mind Board Game'. Retrieved 6 August 2014.
  2. ^ ab'Mastermind Board Game'. Board Game Geek. Retrieved 6 August 2014.
  3. ^'Industrious'. Retrieved 2014-07-07.
  4. ^'Wolfram'. Retrieved 2012-07-09.
  5. ^'Archimedes'. Retrieved 2012-10-07.
  6. ^'Bulls and Cows & co'. Retrieved 2012-07-07.
  7. ^Francis, John (January 2010). 'Strategies for playing MOO, or 'Bulls and Cows''(PDF). Archived from the original(PDF) on 2012-04-25. Retrieved 2017-12-26.
  8. ^'Invicta Toys and Games'. 2007-08-12. Archived from the original on 2007-08-12. Retrieved 2017-12-26.
  9. ^'Invicta Toy History page'. Archived from the original on 2007-08-12. Retrieved 2012-08-07.
  10. ^'Landmark Reunion for Mastermind Box Models'. Retrieved 2006-10-05.
  11. ^Knuth, Donald (1976–77). 'The Computer as Master Mind'(PDF). J. Recr. Math. (9): 1–6.
  12. ^Koyama, Kenji; Lai, Tony (1993). 'An Optimal Mastermind Strategy'. Journal of Recreational Mathematics (25): 230–256.
  13. ^Knuth, Donald (2011). Selected papers on fun and games. Center for the Study of Language and Information. p. 226. ISBN9781575865843.
  14. ^Berghman, Lotte (2007–2008). 'Efficient solutions for Mastermind using genetic algorithms'(PDF). K.U.Leuven (1): 1–15.
  15. ^Merelo, J. J.; Mora, A. M.; Cotta, C.; Runarsson, T. P. (2012). 'An experimental study of exhaustive solutions for the Mastermind puzzle'. arXiv:1207.1315. Bibcode:2012arXiv1207.1315M.Cite journal requires journal= (help)
  16. ^De Bondt, Michiel C. (November 2004). 'NP-completeness of Master Mind and Minesweeper'. Radboud University Nijmegen.Cite journal requires journal= (help)
  17. ^Mastermind is NP-Complete Retrieved 2010-09-02.
  18. ^https://www.mobygames.com/game/bagels
  19. ^'BoardGameGeek'. boardgamegeek.com.
  20. ^'Bulls and Cows Classic'. Archived from the original on 2011-07-22.
  21. ^'Nintendo Shares A Handy Infographic Featuring All 51 Worldwide Classic Clubhouse Games'. Nintendo Life. Retrieved 2020-07-21.

External links[edit]

Retrieved from 'https://en.wikipedia.org/w/index.php?title=Mastermind_(board_game)&oldid=994190052'
As an Amazon Associate I earn from qualifying purchases.

1. Cardinal


Frozen Snowball Adventure Marble Frenzy Racer Game by Cardinal

#adCardinal#ad - Every frozen fan will want to have this game. Suggested uses: 2-4 players can play at one time. Contains: 37 building pieces, 15 marbles, and stickers. Educational: great game to demonstrate to children the concept of force, gravity, speed, motion, and push/pull. Tons of fun: construct your own marble run and race against other. Not intended for children under 3 years of age - Choking Hazard.
Weight1 Pounds
Part Number1
More information#ad

2. U Brands


Magnet and Marker Included 2411U00-04, 11 x 15.5 Inches, Frameless, U Brands Magnetic Dry Erase Board, Marble Print

#adU Brands#ad - Dry erase marker is included, featuring a magnetic cap with built-in felt eraser and a contoured marker cap shape which prevents the markers from rolling off any flat surface or tray.
Make the most of your workspace and combine multiple U-Brands frameless boards to create the ultimate organizational center. The premium magnetic dry erase surface features a chic marble print that is highly durable, never stains or ghosts, erases easily and duals as a bulletin board with a magnet included. Easily mount your 11' x 15. 5' board with the included hassle-free mounting hardware and instructions. Modern frameless design provides a sleek look and is perfect for home, school classroom, office, or any commercial space.
BrandU Brands#ad
ManufacturerU Brands, LLC#ad
Height15.5 Inches
Length0.75 Inches
Width11 Inches
Part Number2411U00-04
More information#ad

3. ClosetMaid


ClosetMaid 1498 KidSpace 2-Tier Horizontal Storage Shelf, White

#adClosetMaid#ad - Product measures: 28. 86-inch h by 4004-inch w by 14. 61-inch D. Wide compartment shelves compatible with ClosetMaid cubical wide wire frame bins sold separately; Cubbie compartments compatible with ClosetMaid cubical 11-inch Fabric drawers and wire bins sold separately. Two sturdy shelves with cubbies ideal for books, bulky items and more; thick top shelf with rounded corners and full back panel for additional support. For indoor use only, material: manufactured wood, TSCA TITLE VI COMPLIANT. All hardware included plus safe wall attachment for easy assembly.
Height28.86 Inches
Length14.61 Inches
Weight43 Pounds
Width40.04 Inches
Part Number1498
More information#ad

4. Fintie


Vegan Leather TV Remote Caddy Desktop Organizer 5 Compartments Fits TV Remotes, Office Supplies, Makeup Brush, Marble Pink, Fintie Remote Control Holder, Media Controllers

#adFintie#ad - Measures 8l x 2. 8w x 4h inches, it fits any coffee table, bedroom desk or workbench perfectly without taking up much space. Fintie remote stand holds up to 5 tv remotes, soundbar remotes or game console media remotes and also works as office supplies desktop organizer, stereo remotes, makeup brush holder or eyeglasses stand.
Nice gift for housewarming or job promotion. Stable upright design with flat bottom allows easily access to apple TV remote, Fire stick, Roku control or any other media essentials without tipping it off. The organizer caddy is constructed with high density board with padded vegan leather exterior and anti-scratch microfiber interior, lightweight and durable. Stylish design adds a visual splash of style to your living room.
Part NumberASAD001US
More information#ad

5. iLeadon


Gilding Marble, 16.5 x 3.5-inch 1.8cm Thick for Gaming Working Typing Wrist Pain Pressure Ease, Ergonomic Wrist Support with High Density Memory Foam & Stitched Edges, iLeadon Keyboard Wrist Rest Pad

#adiLeadon#ad - Measures 16. 54 x 3. 5 x 071 inches, the perfect size make the keyboard rest fits most standard keyboards, easy reduce your wrist pain and pressure when you’re typing or playing games, large note book and apple wired keyboard, gaming keyboards, simple but meet all your needs. Bottom of the keyboard wrist support is designed with natural rubber and textures that will hold a sturdy death grip on any surface you place it on.
Can help protect against fraying, peeling, and curling with some beautiful stitched edges. Edges also had been reinforced to ensure its long service life. Our keyboard wrist pad offers most suitable and ergonomical height for wrist, high density memory foam inside allow the pad can comfortably support your wrists for and bounce back to its origin within several minutes after your hands leave it. Best keyboard support: reduce the friction between hands and desktop which offers you maximum support and more comfort while typing or playing games.
Help you maintain proper wrist alignment, and will help you avoid joint and wrist problems rheumatoid arthritis, carpal tunnel syndrome. Also as its excellent properties, the outside fabric can keep its color for long time with no fade. This keyboard pad is made up of soft lycra fabric which provide enough flexibility and ductility to make the wrist support no easy deformation meanwhile ensure your mouse can easy move without obstacles. Smooth cosy surface. Non slip rubber base.
Part NumberIL-FST1009
More information#ad



Marble Chess Board Chessboard Customized Mouse Pad is Suitable for Games and Work. It is Used for Notebook Computers, Computers and Desktops Antiskid Advanced Mouse Pad

#adVCFDZCFD#ad - Customized mouse pad for games and work, Laptops, Suitable For Computers, Desktops, Advanced Anti-Skid Mouse Pad. High quality surface, this mouse pad is made of high Quality Cloth Surface, And The Anti-Skid Rubber Lower Surface Firmly Grasps The Desktop. Durable. Applicable to all advanced Mouse Types, Standard Size, And Ultimate Value. Delivery time: 7-15 Business Days. The mouse pad can Be Placed Almost Anywhere.
Part NumberVCFDZCFD-133126619
More information#ad



Plus Maze Game and Zipper Skills All in One, Montessori Inspired Educational Learning Toy, Sensory4u Narwhal Sensory Buckle Pillow Fine Motor Development Toy Activity

#adSENSORY4U#ad - Pt and oT therapy game. Developemental education - Designed to help kids ages 3-8 with fine motor skills and to help with hand eye coordination practice. Special education school supplies great for Students Sensory Gyms and More.
Encourages creative / logical thinking, spatial awareness, imaginative play and more. Hands on development: narwhal plush stuffed animal unicorn of the sea. Activity learning sensory pillow toy is uniquely designed with soothing colors to appeal to any child's early fascination with buckles, zippers, latches, buttons, maze game and snaps. Great fidget Dementia Pillow. Our cute and cuddly narwhal is made of soft fabric and measures 11x5x4 inches making it an ideal quiet toy activity for travel, including car and airplane and church, take it with you anywhere.

Eight Marbles Free Online Games For Girls

Part Number234564
More information#ad



Easy to AssembleWhite Marble, Mr IRONSTONE L-Shaped Desk 59' Computer Corner Desk, Office Writing Workstation, Home Gaming Desk, Space-Saving

#adMr IRONSTONE#ad - Larger desktop & ample space:(59+59)”l*21. 7”d double desktop, documents and plants on the spacious desktop. Fast installation & easy cleaning: to make assembling this sturdy l-shaped desk as effortless as possible, the modern desk is ANTI-SKIDDING, numbered parts, ANTI-SCRATCH, we have included quite clear and detailed instructions, and all necessary tools in the package.

Eight Marbles Free Online Game Maker

Extra“ x” style bracings ensures stability and durability. Durable & sturdy construction: the l shaped desk is constructed by high quality P2 MDF Board & Metal Frame. The metal frame offers large weight capacity. Made of textured surface, waterPROOF and EASY CLEANING. Adjustable leg pads ensure the L desk keeps a sturdy construction even on uneven ground. The back of the middle corner is cut off to allow cables to go where they need to, ideal when used as a gaming desk to manage cords from consoles. Mr ironstone's experienced customer service team will response in 24 hours ASAP.

Eight Marbles Free Online Game

Professional customer service: if you have any quality problems within one year, you can contact us any time for after-sales service. L-shaped corner design & multipurpose: both sides of this space-saving study desk are the same length fits snugly in a corner to maximize your limited space. Easy switch of the two sides as your habit, it can totally maximize the daily working, books, papers, the office computer desk can provide massive space to lay 2-3 monitors or screens, gaming and reading enjoyment.
ManufacturerMr IRONSTONE#ad
Height30 Inches
Length59 Inches
Weight58.42 Pounds
Width59 Inches

Eight Marbles Free Online Games

More information#ad