Sunday, 7 April 2013

Visualizing Words


Ever wondered how words are connected. Draw graph to visualize it. Try different layout.
Download Code:
https://github.com/junedmunshi/SampleCode/tree/master/AI/visualizeWordNet

Required:
  • Python
  • networkx 
  • nltk 
  • nltk.corpus : wordnet 
  • pygraphviz

Checkout subdirectory from github

It is not possible to checkout specific  sub directory  from git as it does not support sub repositories .However, git supports submodules so that you can append another project repository as sub repository to you project. Here, you are required to create  different repository for each project .

There is another way to checkout subdirectory  without creating different repositories if you are using Github. Github now supports svn checkout for git repository. Therefor, you can checkout sub directories the same way you can do with svn.

For example, I created repository where I put my sample code of experiments I do. Instead of creating repository for each sample code ,I prefer to logically organize them in hierarchical directory structure. Code related to artificial intelligence goes into AI directory , PHP code goes into Web development directory.Now , if you are interested to checkout sudoku solver which is inside AI directory , execute following command.

svn co https://github.com/junedmunshi/SampleCode/trunk/AI/SudokuSolver

Saturday, 6 April 2013

Sudoku solver backtracking algorithm

This project illustrates how to solve constrain satisfaction problems using backtracking algorithm.It was fun to see how backtracking search exploits computation power of computer to solve constrain satisfaction problem(CSP).

Download code:
https://github.com/junedmunshi/SampleCode/tree/master/AI/SudokuSolver