Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2000
    Messaggi
    1,175

    Sudoku e metodo montecarlo

    Ma secondo voi, parlando di sudoku, il metodo montecarlo è il metodo a forza bruta?
    Ovvero:
    Briefly, a brute force program would solve a puzzle by placing the digit "1" in the first cell and checking if it is allowed to be there. If there are no violations (checking row, column, and box constraints) then the algorithm advances to the next cell, and places a "1" in that cell. When checking for violations, it is discovered that the "1" is not allowed, so the value is advanced to a "2". If a cell is discovered where none of the 9 digits is allowed, then the algorithm leaves that cell blank and moves back to the previous cell. The value in that cell is then incremented by one. The algorithm is repeated until the allowed value in the 81st cell is discovered. The construction of 81 numbers is parsed to form the 9 x 9 solution matrix.

  2. #2
    Utente di HTML.it
    Registrato dal
    Jul 2001
    Messaggi
    1,003
    Si è brute force. Tra l'altro non ho capito perchè usare un algoritmo di quel genere. Cioè per come li risolvo io i sudoku il procedimento è meccanico e non ricorsivo e a colpo sicuro.

  3. #3
    Utente di HTML.it L'avatar di DydBoy
    Registrato dal
    Jul 2005
    Messaggi
    165
    Brute Force e pure pessimo secondo me.

  4. #4
    Utente di HTML.it L'avatar di fred84
    Registrato dal
    Dec 2005
    Messaggi
    434
    personalmente poi mi pare fuori luogo parlare di metodo di monte carlo in questa situazione

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.