Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.programming    |    Programming issues that transcend langua    |    57,431 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 55,648 of 57,431    |
|    Richard Heathfield to Malcolm McLean    |
|    Re: Partial shuffle    |
|    27 Mar 22 10:19:45    |
      From: rjh@cpax.org.uk              On 26/03/2022 10:28 pm, Malcolm McLean wrote:       > You have a list of candidates, ranked by score. You want to try them out in       order, with the better candidates being tried first. However you don't want       the process to be deterministic - each run should yield a separate order. And       you want even low-       ranked candidates to have some chance of being tried early.       >       > Is there a partial sort / partial shuffle which can achieve this?       >       > (The application is a crossword grid filler. I score the words, then try to       fit them into the grid. But I want a different grid each time, and I don't       want it to be too obvious that words with uncommon letters are never chosen.)              The obvious way is to change the score by awarding a pseudo-random       number of bonus points to the low rankers, maybe large to begin with but       reducing it as the fit proceeds so that it doesn't get tried too often.              --       Richard Heathfield       Email: rjh at cpax dot org dot uk       "Usenet is a strange place" - dmr 29 July 1999       Sig line 4 vacant - apply within              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca