I am currently beginning to work on my final project for an Artificial Intelligence class (as part of my B.Sc in Computer Science). In this project we are required to choose an interesting problem in the field of Artificial Intelligence, expanding on one or more topics from class, and solve it. We later write a report discussing our results and submit both the report and the code we've written.
Obviously we are not expected to equal the state of the art in the research of classic problems, but to either examine and solve (to a good degree) an uncommon problem (most of the people opting for this approach choose to solve some simple computer or board game that have yet to be solved to death by the AI research community) or to examine a more common problem in some novel way, perhaps suggesting a new and interesting heuristic or some modification to an existing algorithm. In the latter case, we are not expected to out-perform modern research results, only to offer some new perspective.
The subject my partner and I chose for the project is Sokoban, which puts us in the second group (it has not been researched to death, as only two-thirds of the common test set can be solved by the best solver, but the state-of-the-art solvers for this problem seem too complicated for us to hope to get anywhere near them with a part-time, two weeks project). We want to try and solve Sokoban problems using a search problem approach.
Anyway, before starting to implement our Sokoban solver, I began to wonder which of the few languages we are familiar with (C, C++, Java and Python) is more suitable to be used in the implementation of a search-based solver meant to perform searches on a very big search space (Sokoban has a very deep search tree, with some problems requiring more than 300 moves to solve, and a very high branching factor [over 100 in some problems]; note that this high branching factor is achieved when only stone\box moves are considered, not player moves, and so in each state we may move any of the stones to any of four directions).
The main reason I began to consider this issue is because in another course on artificial intelligence - dealing with applying AI techniques to product design - I created an automated room designer, which will design a room by searching through the state space of all possible room designs (with a given room size and a set of furniture) and returning the state with the highest score (measured by some heuristics). That program was written in Java, and it ran out of memory on each run, after searching only tens of thousands of search nodes. I think the main reason this happened is because I chose a very object-oriented approach for that project; it was written in Java, and every search state was represented by an object, and every such state, when arrived at by a searcher object, was wrapped by a search node - yet another object - which of course meant the program's memory was soon filled with a lot of objects, and thus ran out pretty quickly.
Now, I know part of the problem was using a memory-intensive algorithm (A*), and the way I chose to implement it, but I'm wondering if using Java had some part in the problem too. So this leads me to two questions:
1. Which programming approach, in general, is more suitable when implementing search problems and search algorithms? (Object-Oriented, functional or other)
2. Which programming language is more suitable when implementing search problems and search algorithms, Java, C, C++ or Python? (Other languages are also possible, but only if their syntax is very similar to one of the aforementioned languages)
Specifically, what features and properties of these languages can be used to implement a problem solver meant to search on a very large search space in a memory (and run time) efficient way?