def boggle_hill_climbing(board=None, ntimes=<NUM_LIT:100>, verbose=True):
finder = BoggleFinder()<EOL>if board is None:<EOL><INDENT>board = random_boggle()<EOL><DEDENT>best = len(finder.set_board(board))<EOL>for _ in range(ntimes):<EOL><INDENT>i, oldc = mutate_boggle(board)<EOL>new = len(finder.set_board(board))<EOL>if new > best:<EOL><INDENT>best = new<EOL>if verbose: print(best, _, board)<EOL><DEDENT>else:<EOL><INDENT>board[i] = oldc <EOL><DEDENT><DEDENT>if verbose:<EOL><INDENT>print_boggle(board)<EOL><DEDENT>return board, best<EOL>
Solve inverse Boggle by hill-climbing: find a high-scoring board by
    starting with a random one and changing it.