Skip to content

AIMA4e Overview

Ciaran O'Reilly edited this page Mar 7, 2017 · 7 revisions

Project Organization

AIMA4e is organized into 4 modules:

  • core: This module contains basic implementations of the pseudo-code for the algorithms described in AIMA4e. There are several goals:
    • Implementations are to adhere to the pseudo-code as best as possible, in order to help aid understanding. These are to be basic implementations, without additional features usually found in production code (e.g. logging, metrics gathering etc...) in order to help readers focus on the core aspects of an algorithm's implementation.
    • Provide simple mechanisms for configuring, extending, or making available alternatives to the core implementations (see extra).
    • Code duplication is permitted/encouraged if it helps aid understanding of an individual algorithm on its own (i.e. makes it easier to understand due to being more cohesive).
    • No dependencies on third party libraries in this module.
  • extra: While the core module provides basic implementations of the algorithms, the extra module is intended to allow for alternative implementations to demonstrate or try out ideas. For example, a more efficient or production ready version of an algorithm that diverges from the pseudo-code description in the book. Dependencies on third party libraries are allowed in this module (e.g. ANTLR is used to support parsing of logic expressions).
  • gui: Contains JavaFX based graphical user interfaces intended to provide visualizations of algorithms implemented in the core and extra modules.
  • test: As the core and extra modules may provide alternative implementations of the same underlying algorithm all tests are to be written in this module (see JUnit). Each implemented algorithm should at a minimum have a corresponding set of unit tests written for it.

One of the goals of the AIMA4e branch is to provide implementations that improve upon those in the AIMA3e branch in some way. A few examples of this are:

  • Implementations that are easier to understand/follow.
  • Provide comprehensive support for generics in the search APIs.
  • More robust implementations of the logic based inference algorithms (i.e can be used to solve more than just trivial problems).
  • Address over/under flow issues in the probability APIs (i.e. the AIMA3e implementation just use double internally, which will encounter underflow issues for non-trivial problems - to address, consider working in log-space or using a generics mechanism to provide different Number implementations to work with (e.g. BigDecimal, a Rational implementation etc...)).

Build System

For AIMA4e, it was decided to switch to the Gradle build system to avoid supporting several different systems going forward, which is what happened on AIMA3e (i.e. Eclipse IDE project files, Apache Ant, and Maven). Gradle works well from the command line and self installs when you download the project (you need to use the gradle wrapper - gradlew -, which is included in the root of the project). It also integrates well with the leading IDEs. Plugins are available for the Eclipse IDE and NetBeans IDE while the IntelliJ IDEA supports Gradle out of the box.