simpleai-team / simpleai

simple artificial intelligence utilities
MIT License
968 stars 250 forks source link

Fix visited nodes stat on local search #58

Open fisadev opened 11 years ago

fisadev commented 11 years ago

When using local search the choosen_node event is never raised, so visited_nodes is allways 0. How should we count "visited nodes" on algorithms like beam or genetic?

rafacarrascosa commented 11 years ago

In my opinion, everytime that the "goodness" of a node is evaluated (either the cost of an edge or the fitness of a node) that should count as a "visited node".