Talk:N-queens minimum and knights and bishops: Difference between revisions

Content added Content deleted
m (→‎Simple solution for bishops: added conversion of Julia solution example)
No edit summary
Line 11: Line 11:
:: The title of the pages is, currently "N-queens minimum and knights and bishops". --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 18:31, 20 April 2022 (UTC)
:: The title of the pages is, currently "N-queens minimum and knights and bishops". --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 18:31, 20 April 2022 (UTC)
: Have we already done this? N-Queens is placing N-Queens on an NxN board, here you must place the minimum number such that they do not attack each other but every Unoccupied square is attacked--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:32, 24 April 2022 (UTC)
: Have we already done this? N-Queens is placing N-Queens on an NxN board, here you must place the minimum number such that they do not attack each other but every Unoccupied square is attacked--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:32, 24 April 2022 (UTC)
:: valid.
:: valid. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 14:14, 24 April 2022 (UTC)
:: On the other hand, the minimum "knights" example consumes an overwhelming amount of the computational time here. Bishops are trivial, queens are not trivial but are orders of magnitude faster than knights.
:: And, consequently, an efficient implementation would likely use a different placement algorithm for bishops vs. queens vs. knights. In the F# example, where most of the implementation is not visible, this might not seem relevant. But for other languages this is likely to be an issue. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 22:43, 27 April 2022 (UTC)
== F# errors ==
== F# errors ==
The F# entry fails with qbn.fsx(13,3): error FS0597: Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized (locally, tio, and replit). It does not seem possible to add any more parenthesis to that line. (Excruciatingly awful error message, btw, imo.)<br>
The F# entry fails with qbn.fsx(13,3): error FS0597: Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized (locally, tio, and replit). It does not seem possible to add any more parenthesis to that line. (Excruciatingly awful error message, btw, imo.)<br>