Artificial intelligence

Often we need to mimic intelligent behavior within a game. The scikit-learn project aims to provide an API for machine learning. What I like the most about it is the amazing documentation. We can install scikit-learn with the package manager of our operating system. This option may or may not be available depending on the 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 in the following command at the command line:

pip install -U scikit-learn

Or you can also do it with the following command:

easy_install -U scikit-learn

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

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

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