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

→‎Simple solution for bishops: added suggestion for Wren (ping PureFox)
m (→‎Performance note: <del>'d my cheat remark)
(→‎Simple solution for bishops: added suggestion for Wren (ping PureFox))
Line 98:
 
: Any ideas on how the performance of the Wren solution could be improved? I've tried a number of things but (apart from improving the diagonal checking) no joy so far. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 17:11, 25 April 2022 (UTC)
 
::My suggestion would be to save i,j at <code>allAttacked = false</code>, then also test <code>and that square or attacks it</code>. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 15:37, 11 May 2022 (UTC)
 
:: *I've added Go now. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 18:16, 25 April 2022 (UTC)
 
::Applied the suggested optimisations to the Phix entry (many thanks!):
::Confining bishops to middle column drops that to 0s. (Likewise you could confine rooks to the main diagonal.)
::First queen on a 10x10 now limited to 9 places (was 28), first knight for n>=3 now limited to 2 places (was 3).
::Time for all solutions to 10x10 dropped from 12 mins to 3 mins (almost all being 10N examining 21,801,024 positions). --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 14:12, 11 May 2022 (UTC)
 
==Some Observations==
7,795

edits