May 23, 2012

Factor AI

Here is a free project I implemented last year: an Artificial Intelligence in Factor language.
This program is capable of completing a sequence of integer in a logical way, using nothing but copy and increment.

Give it { 1 2 2 3 3 3 }, it will give you { 1 2 2 3 3 3 4 4 4 4 }.
Give it { 1 2 2 3 3 4 }, it will give you { 1 2 2 3 3 4 4 5 }.

Feel free to play with it and look into the source code ! Also, don’t forget that it can only increment (by one) and copy 🙂

For those who don’t know it, Factor is a really different language based on a stack system.
This allows the programmer to easily implement back-tracking and other things useful in AI.

Follow this project on github.