I thought about an AI library for python. This is the possible
structure I came up with. Are there any thoughts about it?
ailib/
search.py
class State:
represents an immutable state of a problem
def __str__(self):
pass
def
On 15 dic, 08:50, Felix Benner [EMAIL PROTECTED] wrote:
I thought about an AI library for python. This is the possible
structure I came up with. Are there any thoughts about it?
Without commenting about the library itself:
None, True and False are spelled this way.
None is a singleton, compare
Felix Benner wrote:
[...]
def a-star(self, nodeFrom, nodeTo):
searches the shortest path (minimal weight) from
nodeFrom to nodeTo.
pass
def a-star(self, nodeFrom, nodeTo):
File stdin, line 1
def a-star(self, nodeFrom, nodeTo):
Gabriel Genellina:
This is more stylish, but I prefer to use isxxx() or hasxxx() for
functions that return booleans.
Lisp-like languages allow the ending ? or !, I think Ruby allows the
ending ? too (allowing it with Python may be positive). Mathematica
usually uses an ending uppercase Q, like