First version of PETIT's artificial intelligence. Some correction in pathwrapper.