Using F# to implement common AI algorithms