Lines Matching defs:solution
86 "*Delay in seconds when animating a solution crack."
334 (5x5-crack #'5x5-make-random-solution))
338 "Attempt to crack 5x5 by mutating the current solution."
344 "Attempt to crack 5x5 by mutating the best solution."
350 "Attempt to crack 5x5 by xoring the current and best solution.
357 "Attempt to find a solution for 5x5.
361 solution and the second will be the best solution so far. The function
362 should return a grid vector array that is the new solution."
367 (let* ((best-solution (5x5-make-random-grid))
368 (current-solution best-solution)
374 (setq current-result (5x5-play-solution current-solution best-solution))
376 (setq best-solution current-solution
378 (setq current-solution (funcall breeder
379 (5x5-copy-grid current-solution)
380 (5x5-copy-grid best-solution)))))
383 (defun 5x5-make-random-solution (&rest ignore)
384 "Make a random solution."
388 "Mutate the current solution."
389 (5x5-mutate-solution current))
392 "Mutate the best solution."
393 (5x5-mutate-solution best))
396 "Xor current and best solution then mutate the result."
403 (5x5-mutate-solution xored)))
405 (defun 5x5-mutate-solution (solution)
406 "Randomly flip bits in the solution."
411 (5x5-flip-cell solution y x))))
412 solution)
414 (defun 5x5-play-solution (solution best)
415 "Play a solution on an empty grid. This destroys the current game
423 (if (5x5-cell solution y x)
425 (5x5-draw-grid (list 5x5-grid solution best))