Note that this repository uses submodules. To clone use with submodules:
git clone --recurse-submodules https://github.com/Jeff-Russ/COS-451.git
cd COS-451
git submodule init
git submodule update
When updating, make sure your pull includes submodules (COS-451/
directory):
git pull --recurse-submodules
You may also need to do the following for the aima-python
submodule:
Install the basic dependencies to run the project on your system:
cd aima-python
pip3 install -r requirements.txt
You may need to fetch the datasets from the aima-data
repository:
git submodule init
git submodule update
Wait for the datasets to download, it may take a while. Once they are downloaded, you need to install pytest
, so that you can run the test suite:
pip install pytest
Then to run the tests:
py.test
.ipynb
files Jupyter. Recommend installing Anaconda 3, which includes Jupyter and JupyterLab. It is not recommended to install Anaconda for "All Users", otherwise you will have to run the Anaconda Prompt as an Administrator!
The AIMA visualization are available on the aima-javascript page.
If you create a python script in the project directory and want to import from the COS-451/aima-python/
library (submodule), add this to your script:
import sys
sys.path.append(sys.path[0]+"/aima-python")
The second line add the aima-python
is the directory to path so we can import any files from aima-python/
directly. This way of of doing things corrects an issue of import statements from within aima-python/
failing. Here are some examples of imports you can have after the two lines above.
from csp import Sudoku
from search import *
In other words, you can import from COS-541/
just as if you are in COS-451/aima-python/
.