{"id":70009,"date":"2026-11-09T07:48:11","date_gmt":"2026-11-09T02:18:11","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/games\/mancala\/"},"modified":"2026-11-09T07:48:11","modified_gmt":"2026-11-09T02:18:11","slug":"mancala","status":"publish","type":"page","link":"https:\/\/www.quickonlinetips.com\/archives\/games\/mancala\/","title":{"rendered":"Mancala: Play Online Against the Computer or a Friend"},"content":{"rendered":"<p>Play <strong>Mancala<\/strong> free online against the computer or a friend. Pick up all the seeds from one of your pits, sow them one by one around the board, and collect more seeds in your store than your opponent. Land in your own store for an extra turn, and land in an empty pit to capture seeds from across the board.<\/p>\n<style>.qmc-board{display:flex;align-items:stretch;gap:8px;max-width:640px;margin:10px auto 0;padding:12px;border-radius:40px;background:linear-gradient(160deg,#A86B3C,#7A4520);box-shadow:inset 0 2px 0 rgba(255,255,255,.25),0 4px 10px rgba(0,0,0,.25);user-select:none;-webkit-user-select:none;touch-action:manipulation} .qmc-mid{flex:1 1 auto;display:grid;grid-template-columns:repeat(6,1fr);grid-template-rows:1fr 1fr;gap:8px;min-width:0} .qmc-pit,.qmc-store{position:relative;background:radial-gradient(circle at 50% 40%,#4A2A12,#5E3818 70%);border-radius:50%;box-shadow:inset 0 4px 8px rgba(0,0,0,.55);display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:2px;padding:10%;aspect-ratio:1;min-width:0} .qmc-store{border-radius:40px;aspect-ratio:auto;width:13%;min-width:40px;flex:0 0 auto} .qmc-seed{width:9px;height:9px;flex:0 0 auto;border-radius:50%;box-shadow:inset -1px -1px 0 rgba(0,0,0,.3)} .qmc-store .qmc-seed{width:10px;height:10px} .qmc-n{position:absolute;left:50%;transform:translateX(-50%);bottom:-2px;font-size:13px;font-weight:800;color:#FFF7E6;background:rgba(0,0,0,.45);border-radius:9px;padding:0 6px;line-height:18px} .qmc-store .qmc-n{bottom:6px;font-size:16px} .qmc-can{cursor:pointer;box-shadow:inset 0 4px 8px rgba(0,0,0,.55),0 0 0 3px #FCD34D} .qmc-can:hover{background:radial-gradient(circle at 50% 40%,#5A3618,#6E4420 70%)} .qmc-hot{box-shadow:inset 0 4px 8px rgba(0,0,0,.55),0 0 0 3px #4ADE80} .qmc-who{display:flex;justify-content:space-between;max-width:640px;margin:10px auto 0;font-size:14px;font-weight:700;color:#4A5568} .qmc-msg{text-align:center;font-size:19px;font-weight:700;color:#215387;min-height:1.5em;margin:6px 0 0} .qmc-mnote{display:none;text-align:center;font-size:14px;font-weight:700;color:#4A5568;margin:8px 0 0} @media (max-width:560px){.qmc-board{flex-direction:column;max-width:300px;border-radius:30px;padding:10px}.qmc-mid{grid-template-columns:1fr 1fr;grid-template-rows:repeat(6,1fr);grid-auto-flow:column;direction:rtl;gap:10px 18px;padding:0 18px}.qmc-mid > *{direction:ltr}.qmc-store{width:auto;height:64px;border-radius:30px}.qmc-pit{aspect-ratio:auto;height:64px;border-radius:30px}.qmc-seed{width:11px;height:11px}.qmc-store .qmc-seed{width:9px;height:9px}.qmc-who{display:none}.qmc-mnote{display:block}}<\/style>\n<div class=\"qt-tool\" id=\"qmc\"><p class=\"qt-label\" style=\"font-size:1.15em;margin:0 0 10px\"><strong>Step 1:<\/strong> Choose your opponent<\/p> <div class=\"qt-grid\"><div class=\"qt-field\"><label for=\"qmc-mode\">Opponent<\/label><select id=\"qmc-mode\"><option value=\"1\">Computer: easy<\/option><option value=\"2\" selected>Computer: medium<\/option><option value=\"3\">Computer: hard<\/option><option value=\"2p\">Friend (2 players)<\/option><\/select><\/div> <div class=\"qt-field\"><label for=\"qmc-first\">Who goes first<\/label><select id=\"qmc-first\"><option value=\"0\" selected>Bottom player<\/option><option value=\"1\">Top player<\/option><\/select><\/div> <div class=\"qt-field\"><label for=\"qmc-seeds\">Seeds per pit<\/label><select id=\"qmc-seeds\"><option value=\"3\">3 (quick game)<\/option><option value=\"4\" selected>4 (standard)<\/option><option value=\"5\">5<\/option><option value=\"6\">6 (long game)<\/option><\/select><\/div><\/div> <p class=\"qt-label\" style=\"font-size:1.15em;margin:18px 0 10px\"><strong>Step 2:<\/strong> Tap one of your pits to sow its seeds<\/p> <p class=\"qmc-msg\" id=\"qmc-msg\" aria-live=\"polite\"><\/p> <p class=\"qmc-mnote\" id=\"qmc-mnote\"><\/p><div class=\"qmc-who\"><span id=\"qmc-topname\">Computer's store<\/span><span id=\"qmc-topside\">Computer's pits<\/span><span><\/span><\/div> <div class=\"qmc-board\" id=\"qmc-board\"><div class=\"qmc-store\" id=\"qmc-p13\"><\/div><div class=\"qmc-mid\" id=\"qmc-mid\"><\/div><div class=\"qmc-store\" id=\"qmc-p6\"><\/div><\/div> <div class=\"qmc-who\"><span><\/span><span id=\"qmc-botside\">Your pits<\/span><span id=\"qmc-botname\">Your store<\/span><\/div> <div class=\"qt-stats\" style=\"grid-template-columns:repeat(2,1fr)\"><div class=\"qt-stat\"><span class=\"qt-num\" id=\"qmc-w1\">0<\/span><span class=\"qt-lab\" id=\"qmc-l1\">Your wins<\/span><\/div><div class=\"qt-stat\"><span class=\"qt-num\" id=\"qmc-w2\">0<\/span><span class=\"qt-lab\" id=\"qmc-l2\">Computer wins<\/span><\/div><\/div> <div class=\"qt-row\" style=\"justify-content:center\"><button type=\"button\" class=\"qt-btn qt-btn-big\" id=\"qmc-new\">New game<\/button><button type=\"button\" class=\"qt-btn qt-btn-ghost\" id=\"qmc-undo\">Undo move<\/button><\/div> <p class=\"qt-note\"><strong>Private by design:<\/strong> the game and the computer player run in your own browser. Nothing is sent to QuickOnlineTips or stored.<\/p><\/div>\n<script>(function () { function qtReady(fn) { if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', fn); } else { fn(); } } function qtRand32() { var c = window.crypto || window.msCrypto; if (c) { if (c.getRandomValues) { var a = new Uint32Array(1); c.getRandomValues(a); return a[0]; } } return Math.floor(Math.random() * 4294967296); } function qtRandInt(range) { var limit = Math.floor(4294967296 \/ range) * range; var x = qtRand32(); while (x >= limit) { x = qtRand32(); } return x % range; } qtReady(function () { var root = document.getElementById('qmc'); if (!root) { return; } function $(id) { return document.getElementById('qmc-' + id); } var COL = ['#F87171', '#60A5FA', '#34D399', '#FBBF24', '#A78BFA', '#F472B6', '#FDBA74', '#E2E8F0']; var pits = [], el = [], turn = 0, over = false, busy = false, hist = [], wins = [0, 0], tmr = 0, hot = -1; function sideSum(b, s) { var t = 0, k; for (k = 0; 6 > k; k++) { t += b[s * 7 + k]; } return t; } function sweep(b) { if (sideSum(b, 0) === 0 || sideSum(b, 1) === 0) { for (var k = 0; 6 > k; k++) { b[6] += b[k]; b[k] = 0; b[13] += b[7 + k]; b[7 + k] = 0; } return true; } return false; } function sow(p, i) { var b = p.slice(), side = i > 6 ? 1 : 0, n = b[i], j = i, path = [], skip = side === 0 ? 13 : 6, store = side === 0 ? 6 : 13; b[i] = 0; while (n > 0) { j = (j + 1) % 14; if (j === skip) { continue; } b[j]++; n--; path.push(j); } var extra = j === store, cap = 0, opp = 12 - j; if (!extra) { var own = side === 0 ? 6 > j : (j > 6 ? j !== 13 : false); if (own) { if (b[j] === 1) { if (b[opp] > 0) { cap = b[opp] + 1; b[store] += cap; b[j] = 0; b[opp] = 0; } } } } var end = sweep(b); return { b: b, extra: extra, cap: cap, path: path, last: j, opp: opp, end: end }; } function legal(b, s) { var out = [], k; for (k = 0; 6 > k; k++) { if (b[s * 7 + k] > 0) { out.push(s * 7 + k); } } return out; } function search(b, s, depth, a, z) { var ms = legal(b, s); if (!ms.length) { return (b[13] - b[6]) * 10; } if (depth === 0) { return (b[13] - b[6]) * 10 + (sideSum(b, 1) - sideSum(b, 0)); } var res = ms.map(function (m) { return sow(b, m); }).sort(function (p, q) { return (q.extra ? 1 : 0) - (p.extra ? 1 : 0); }); var best = s === 1 ? -Infinity : Infinity; for (var k = 0; res.length > k; k++) { var r = res[k], ns = r.extra ? s : 1 - s, v = search(r.b, ns, depth - 1, a, z); if (s === 1) { if (v > best) { best = v; } if (best > a) { a = best; } } else { if (best > v) { best = v; } if (z > best) { z = best; } } if (a >= z) { break; } } return best; } function aiMove() { var ms = legal(pits, 1), lvl = $('mode').value; if (lvl === '1') { var ex = ms.filter(function (m) { return sow(pits, m).extra; }); if (ex.length) { if (qtRandInt(2)) { return ex[0]; } } return ms[qtRandInt(ms.length)]; } var depth = lvl === '2' ? 4 : 9, best = ms[0], bv = -Infinity; ms.forEach(function (m) { var r = sow(pits, m), v = search(r.b, r.extra ? 1 : 0, depth - 1, -Infinity, Infinity) + qtRandInt(2); if (v > bv) { bv = v; best = m; } }); return best; } function vsAI() { return $('mode').value !== '2p'; } function who(s) { return vsAI() ? (s === 0 ? 'You' : 'The computer') : (s === 0 ? 'Player 1' : 'Player 2'); } function say(t) { $('msg').textContent = t; } function seeds(box, n) { box.textContent = ''; var show = Math.min(n, box.classList.contains('qmc-store') ? 30 : 15), k; for (k = 0; show > k; k++) { var s = document.createElement('span'); s.className = 'qmc-seed'; s.style.background = COL[(k * 5 + n) % COL.length]; box.appendChild(s); } var lab = document.createElement('span'); lab.className = 'qmc-n'; lab.textContent = n; box.appendChild(lab); } function draw(b) { var mine = !over; if (busy) { mine = false; } if (vsAI()) { if (turn !== 0) { mine = false; } } for (var i = 0; 14 > i; i++) { seeds(el[i], b[i]); var can = mine ? ((turn === 0 ? 6 > i : (i > 6 ? i !== 13 : false)) ? b[i] > 0 : false) : false; if (i === 6 || i === 13) { can = false; } el[i].classList.toggle('qmc-can', can); el[i].classList.toggle('qmc-hot', i === hot); el[i].setAttribute('aria-label', (i === 6 || i === 13 ? 'Store' : 'Pit') + ' with ' + b[i] + ' seeds' + (can ? ', tap to sow' : '')); } } function finish() { over = true; busy = false; var a = pits[6], c = pits[13], t; if (a === c) { t = 'It is a draw, ' + a + ' to ' + c + '.'; } else if (a > c) { wins[0]++; t = (vsAI() ? 'You win ' : 'Player 1 wins ') + a + ' to ' + c + '! \ud83c\udf89'; } else { wins[1]++; t = (vsAI() ? 'The computer wins ' + c + ' to ' + a + '. Try again!' : 'Player 2 wins ' + c + ' to ' + a + '! \ud83c\udf89'); } $('w1').textContent = wins[0]; $('w2').textContent = wins[1]; hot = -1; draw(pits); say(t); } function prompt(pre) { hot = -1; draw(pits); if (over) { return; } if (vsAI()) { if (turn === 1) { busy = true; draw(pits); say(pre + 'Computer is thinking...'); tmr = setTimeout(function () { play(aiMove()); }, 500); return; } say(pre + 'Your turn: tap one of your pits.'); return; } say(pre + who(turn) + ', tap one of your pits.'); } function play(i) { var r = sow(pits, i), shown = pits.slice(), k = 0, step = Math.max(70, Math.min(190, Math.floor(1500 \/ r.path.length))); busy = true; shown[i] = 0; hot = i; draw(shown); function tick() { if (r.path.length > k) { shown[r.path[k]]++; hot = r.path[k]; k++; draw(shown); tmr = setTimeout(tick, step); return; } tmr = setTimeout(function () { busy = false; pits = r.b; var pre = ''; if (r.cap) { pre = who(turn) + ' captured ' + r.cap + ' seeds! '; } if (r.end) { finish(); return; } if (r.extra) { pre += who(turn) + (turn === 0 ? (vsAI() ? ' get' : ' gets') : ' gets') + ' another turn. '; } else { turn = 1 - turn; } prompt(pre); }, r.cap ? 500 : 200); } tmr = setTimeout(tick, step); } function click(i) { if (over || busy) { return; } if (vsAI()) { if (turn !== 0) { return; } } if (legal(pits, turn).indexOf(i) === -1) { if (i !== 6) { if (i !== 13) { say(pits[i] === 0 ? 'That pit is empty. Choose a pit with seeds.' : 'That is not your side. Tap a pit on your side.'); } } return; } hist.push({ p: pits.slice(), t: turn }); play(i); } function reset() { clearTimeout(tmr); var n = Number($('seeds').value); pits = []; for (var i = 0; 14 > i; i++) { pits.push(i === 6 || i === 13 ? 0 : n); } turn = Number($('first').value); over = false; busy = false; hist = []; hot = -1; var ai = vsAI(), p1 = ai ? 'Your' : 'Player 1\\'s', p2 = ai ? 'Computer\\'s' : 'Player 2\\'s'; $('l1').textContent = ai ? 'Your wins' : 'Player 1 wins'; $('l2').textContent = ai ? 'Computer wins' : 'Player 2 wins'; $('topname').textContent = p2 + ' store'; $('topside').textContent = p2 + ' pits'; $('botname').textContent = p1 + ' store'; $('botside').textContent = p1 + ' pits'; $('mnote').textContent = (ai ? 'Your pits are on the left and your store is at the bottom.' : 'Player 1: left pits and bottom store. Player 2: right pits and top store.'); $('first').options[0].textContent = ai ? 'You' : 'Player 1'; $('first').options[1].textContent = ai ? 'Computer' : 'Player 2'; prompt(''); } var mid = $('mid'), order = [12, 11, 10, 9, 8, 7, 0, 1, 2, 3, 4, 5]; for (var i = 0; 14 > i; i++) { el.push(null); } order.forEach(function (k) { var d = document.createElement('div'); d.className = 'qmc-pit'; d.addEventListener('click', function () { click(k); }); mid.appendChild(d); el[k] = d; }); el[6] = $('p6'); el[13] = $('p13'); $('new').addEventListener('click', reset); $('undo').addEventListener('click', function () { if (!hist.length) { say('Nothing to undo yet.'); return; } clearTimeout(tmr); busy = false; over = false; var h = hist.pop(); pits = h.p; turn = h.t; prompt(''); }); $('mode').addEventListener('change', function () { wins = [0, 0]; $('w1').textContent = 0; $('w2').textContent = 0; reset(); }); $('first').addEventListener('change', reset); $('seeds').addEventListener('change', reset); reset(); }); })();<\/script>\n<div class=\"qt-next\"><p class=\"qt-next-h\">Play next<\/p><div class=\"qt-next-g\"><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/backgammon\/\">Backgammon<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/reversi\/\">Reversi<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/nim\/\">Nim<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/checkers\/\">Checkers<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/dots-and-boxes\/\">Dots and Boxes<\/a><a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/gomoku\/\">Gomoku<\/a><\/div><\/div>\n<p><strong>Quick answer:<\/strong> Tap one of your pits. Its seeds are sown one per pit, counter-clockwise, into the following pits and your own store, skipping your opponent&#8217;s store. If your last seed lands in your store, you go again. If it lands in an empty pit on your side, you capture it plus all the seeds in the pit opposite. When one side is empty, the game ends and the player with more seeds wins.<\/p>\n<h2>How to play Mancala<\/h2>\n<ol>\n<li><strong>The board.<\/strong> Each player has six pits on their side and a store at their right-hand end. Every pit starts with four seeds (you can choose three to six).<\/li>\n<li><strong>Sowing.<\/strong> On your turn, pick up all the seeds in one of your pits and drop one into each following pit, counter-clockwise. Drop seeds into your own store as you pass it, but skip your opponent&#8217;s store.<\/li>\n<li><strong>Extra turn.<\/strong> If your last seed lands in your own store, take another turn.<\/li>\n<li><strong>Capture.<\/strong> If your last seed lands in an empty pit on your side and the pit directly opposite has seeds, move both your seed and the opposite seeds into your store.<\/li>\n<li><strong>End of the game.<\/strong> When all six pits on either side are empty, each player moves any seeds left on their side into their own store. The player with the most seeds in their store wins.<\/li>\n<\/ol>\n<h2>Mancala strategy tips<\/h2>\n<ul>\n<li><strong>Chain extra turns.<\/strong> Count the seeds: a pit that is exactly as many steps from your store as it has seeds ends in your store. Play the pit closest to your store first, so the others still line up.<\/li>\n<li><strong>Look for captures.<\/strong> An empty pit on your side opposite a full pit is a target. So is your opponent&#8217;s, so protect your big pits.<\/li>\n<li><strong>Keep seeds on your side late in the game.<\/strong> When one side runs out, the other player keeps the seeds still on their side.<\/li>\n<li><strong>Do not feed your opponent.<\/strong> Big sowings pass seeds to the other side. Sometimes a small move is better.<\/li>\n<\/ul>\n<p>This version uses the most widely played Mancala rules, with six pits a side. Mancala is really a large family of sowing games played around the world for centuries, with many local rule sets.<\/p>\n<p>Enjoy board games? Try <a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/backgammon\/\">Backgammon<\/a>, <a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/reversi\/\">Reversi<\/a> or <a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/nim\/\">Nim<\/a>, or see all our <a href=\"https:\/\/www.quickonlinetips.com\/archives\/games\/\">free online games<\/a>.<\/p>\n<h2>FAQ<\/h2>\n<h3>Can I play Mancala with a friend?<\/h3>\n<p>Yes. Choose <strong>Friend (2 players)<\/strong> and pass the device. Player 1 plays the bottom (left on phones) and Player 2 the top (right on phones).<\/p>\n<h3>How many seeds are in Mancala?<\/h3>\n<p>The standard game uses 48 seeds: four in each of the twelve pits. Choose three seeds per pit for a quicker game or six for a longer one.<\/p>\n<h3>Is the computer hard to beat?<\/h3>\n<p>Easy plays almost at random. Medium looks a few moves ahead, and hard looks about nine moves ahead, so it is tough to beat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Play Mancala free online against the computer or a friend. Pick up all the seeds from one of your pits, sow them one by one around the board, and collect more seeds in your store than your opponent. Land in your own store for an extra turn, and land in an empty pit to capture&#8230;<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":66148,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-70009","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/70009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=70009"}],"version-history":[{"count":0,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/70009\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/pages\/66148"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=70009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}