Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to efficiently rack up billiards for an 8-ball game?
    primarykey
    data
    text
    <p>Since racking of billiard balls for the 8-ball game can be done under multiple rules, here's the racking I refer to:</p> <p><img src="https://i.stack.imgur.com/387wv.gif" alt="enter image description here"></p> <p>i.e. the 8-ball must be in the center, and along the sides the stripes and the solids must alternate. The two remaining balls (a stripe and a solid) don't matter.</p> <p>Assume you just finished a game, gather the balls, put them in the rack and proceed to arrange them to start a new one. They're now in a random order. How do you proceed?</p> <p><sub>Disclaimer: paint art follows</sub></p> <p><img src="https://i.stack.imgur.com/0QWhJ.png" alt="enter image description here"></p> <p>A simple approach would be to start in order, top -> bottom and left -> right.</p> <p>So for example, we'd assume <code>1</code> is at the correct position. <code>5</code> is not, we swap it with <code>2</code>, then we swap <code>4</code> with <code>3</code> (or with <code>8</code>), but this would already be inefficient because we've either moved the <code>4</code> to the center or the <code>8</code> in <code>4</code>'s position - i.e. not where it has to be at the end.</p> <p>There's also the decision of which types of balls we want in the corners to be made. How do you decide that upfront? Should you take into account how many balls are already in place? In my example, if you want the grey ones in the corners, you already have 3 in place (balls 1,10,14). If you want the white ones in the corners, you have just 2 of them in place (2,11). Should this matter?</p> <p>To formalize this, we can assume there are <del>two</del> three operations we can do:</p> <ul> <li>swap two adjacent balls </li> <li>swap two non-adjacent balls</li> <li>rotate rack</li> </ul> <p>Since we can use both hands, let's assume we can parallelise the first operation (swap 2 couple of balls at the same time), whereas we can only swap two non-adjacent balls at a time.</p> <p>What approach is best suited for this task that minimizes the time (in the time units described)? Would greedy be best for this? (it's how I do it when I rack them up, I guess)</p> <p>EDIT: As per existing (or previous answers) - you might assume having more stripes than solids in the corners means that strides will prefer corners - not saying it isn't true, but if you make that assumption, please prove it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload