def __init__(self, sentence=None, path='xsb'): '''Constructor method Usage: XSBKB( sentence, path ) sentence - Prolog sentence to be added to the KB (default: None) path - path to XSB executable (default: 'xsb')''' self.xsb = xsb(path) if sentence: self.tell(sentence)
def __init__(self): self.xsb = xf.xsb(self.XSB_PATH) self.xsb.load('prolog/game.P') self.NewGame()