Introduction
The ArtificialIdea.com Project aims to create an open source library for the technological and research field of Artificial Intelligence, providing to the industry and research community a tool in pure Java and Groovy which:
- covers a broad range of artificial intelligence algorithms, including those discussed in common text books like Artificial Intelligence, A Modern Approach.
- is easy to incorporate in other projects (classes are designed as general as possible)
- is well-documented (decreasing the time needed to understand it):
- use exhaustively advance concepts in Object Oriented Programming, keeping the structure of the source code close to the problem.
- is easy to use for teaching and learning A.I. (there are applets to demonstrate and test the algorithms with different problems).
- is self-contained: no external dependencies.
- keeps packages independent: each one covers a sub-field of AI, and is independent from other packages not related to it, so that only a subset is needed to be understood in order to use it.
- and to be free, under the GPL
For a list of algorithms already implemented see the algorithms list page.
It is not designed for performance, but it can help to design fast other software: the first step of the technique "a first design to throw away" is already provided ;-).
Why Java?
Java is a widely known, fast, object oriented language with a huge community, support, documentation and pool of free libraries and utilities.
And Groovy?
One big problem with Java is its verbosity. Groovy reduces it. It follows a code in Java and its equivalent in Groovy (the example is from the book Groovy in Action).
private static List getProductNamesWithItemTotal(Invoice[] invoices) {
List result = new LinkedList();
for (int i = 0; i < invoices.length; i++) {
List items = invoices[i].getItems();
for (Iterator iter = items.iterator(); iter.hasNext();) {
LineItem lineItem = (LineItem) iter.next();
if (lineItem.total() > 7000){
result.add(lineItem.getProduct().getName());
}
}
}
return result;
}
In Groovy the same code is just one line:
invoices.items.grep{ it.total() > 7000 }.product.name
Artificial Idea (A.I.)












