eight queens puzzle

(redirected from Eight queens)

eight queens puzzle

A puzzle in which one has to place eight queens on a chessboard such that no queen is attacking any other, i.e. no two queens occupy the same row, column or diagonal. One may have to produce all possible such configurations or just one.

It is a common students assignment to devise a program to solve the eight queens puzzle. The brute force algorithm tries all 64*63*62*61*60*59*58*57 = 178,462,987,637,760 possible layouts of eight pieces on a chessboard to see which ones meet the criterion. More intelligent algorithms use the fact that there are only ten positions for the first queen that are not reflections of each other, and that the first queen leaves at most 42 safe squares, giving only 10*42*41*40*39*38*37*36 = 1,359,707,731,200 layouts to try, and so on.

The puzzle may be varied with different number of pieces and different size boards.

This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)
References in periodicals archive ?
But the eight queens all showed up at an intimate media gathering at the Black Scoop Cafe at the Gateway Mall at the Araneta Center in Quezon City on Wednesday afternoon.
The (https://www.ibtimes.com/doctor-who-christmas-special-2018-moves-new-years-day-2019-2732746) one-hour special , "RuPaul's Drag Race Holi-slay Spectacular," will follow eight queens as they compete for the title of Drag Race Xmas Queen.
The so-called "Task for the Eight Queens" was formulated in the middle of the 19th century.
Devised in 1850, the Queens Puzzle originally challenged a player to place eight queens on a standard chessboard so that no two queens could attack each other.
The corridor of the new lab (figure 10) was reworked within its limits by including whiteboard spaces for collaborative work, a barely suspended ceiling with new lighting under the existing hard ceiling, and floor tiles that incorporate the Eight Queens Chess Puzzle.
And the ceremony attracted eight queens, three kings and a pack of princes and prin- cesses - each ready for a kiss on the cheek.
WHEN there are eight queens and three kings at your wedding, you'd best observe a royal pecking order.
There were sixty-seven pieces, including eight kings, eight queens and sixteen bishops; their colours were natural ivory and deep red.