Artificial Intelligence

Often we need to mimic intelligent behavior within a game. The scikit-learn project aims to provide an API for machine learning, and what I like most about it is its amazing documentation. We can install scikit-learn with the package manager of our operating system, though this option may or may not be available, depending on your operating system, but should be the most convenient route. Windows users can just download an installer from the project website. On Debian and Ubuntu, the project is called python-sklearn. On MacPorts, the ports are called py26-scikits-learn and py27-scikits-learn. We can also install from source or using easy_install. There are third-party distributions from Python(x,y), Enthought, and NetBSD.

We can install scikit-learn by typing at command line:

$ [sudo] pip install -U scikit-learn

We can also type the following instead of the preceding line:

$ [sudo] easy_install -U scikit-learn

This may not work because of permissions, so you might need to put sudo in front of the commands or log in as admin.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset