AI classes that use a functional language
C# as been augmented with a lot of functional and dynamic features.
Here is an article to teach you to use C# as a fully functional language.
http://www.codeproject.com/Articles/375166/Functional-programming-in-Csharp
From a language theory point of view, the interesting part in functional languages is that you don't have assignment.But I thought functional languages were in part meant to do AI.
You program them by calling a function for each calculation step, like
def sum_N(n):
if n == 0:
return 0
else:
return 1 + sum_N(n-1)
As far as I know, functional languages are not specifically designed for AI.Maybe you mean logical languages like Prolog instead? You write 'facts' and reasoning rules in them, and then ask a question, where the program then tries to find an answer (typically yes/no).
Many languages now allow a mix of functional and imperative styles. C# is becoming more functional and F# is a mix but biased to Functional. I believe the only really pure functional language is Haskell but this hardcore mentality has limited its take up in the real world, shame as it is a beautiful language.
Here is my A* in C# which is fully immutable, uses a fair chunk of functional thinking etc. There is a while loop as C# does not have tail call optimisation and so recursion would risk stack blowout and also I have made many of the functions extensions to give more fluent style. I did consider a trampoline to mimic tail call but these always look ugly and just add too much noise to the code
https://github.com/WozSoftware/BadlyDrawRogue/blob/master/Woz.PathFinding/RouteFinder.cs
Keep in mind also that there is a fairly strong split between game development AI and academic AI. The two disciplines often tend to have significantly different objectives, and so the techniques and recommendations tend to be quite different also. Functional programming languages are more popular among academia, and may also be more useful for the AI tasks undertaken within academic research. But even if so, that might have very little bearing on the types of AI tasks undertaken within game development, where imperative and object oriented styles are far more common and familiar.