I'm interested in AI, especially now that the www is a gigantic knowledge pool. I thought I'll learn C in order to experiment with getting "knowledge" from the internet and use it in a program. However, someone told me to take a higher level language like Java, because C is for system programming. Java is very good in accessing the internet, html processing,... all things I will need. In C I will have to program everything myself. Even a string in C is actually just an array of chars (ints)...

However, as soon as I began learning Java, I had the feeling Java is too bloated. Just simply testing 2 objects for equality, forces you to write an error-prone equals method.
Input and output is organized in a tremendous amount of classes: Digest Outputstream, Deflater OutputStream, Checked OutputStream, Buffered OutputStream,....
I think I won't be able to memorize the language, it's just too big. On the other hand C is smaller, but you have to write everything yourself.
What's your opinion about this? Is C suited for AI-programming? Is Java better?
I'm a hobbyist, not a professional, if that's relevant.

It is. Because you need to find something that feels/seems natural to your sense of logic such that you stick with moving forward. What we often see is people with a great deal of exuberance at the beginning fade due to a lack of a clear goal which propels them through the hills & valleys of the learning curve they need to surmount. So if C seems more natural to what you want, use it. If not, use a different language.

Java isn't the only alternative. I would suggest Python because it is devoid of a lot of syntactic clutter that bogs a number of people down. You should also consider Perl because it has a mature third-party library where some modules specifically target Web spidering.

Quote:

...someone told me to take a higher level language like Java, because C is for system programming. Java is very good in accessing the internet, html processing,... all things I will need.

Java is a reasonable alternative. Some call it bloated because their perspective is biased from experiences in different languages. All languages have to market themselves to become institutionalized, & Sun chose to throw in lots of libraries. Maybe some target your goals, & most likely a number don't. Java is a big language today, & no one knows all of its libraries. Knowing it all shouldn't be your goal. What should be your goal is to learn what is needed to solve problems in the domain you are interested.

Quote:

What's your opinion about this? Is C suited for AI-programming? Is Java better?

I'm not convinced this is the right question. My suggestion would be look through the CPAN modules for Perl & see if any meet your needs. If any do, then the answer is much more clear. You can find CPAN at the following address:

It depends on what you want to do with AI. There is a big difference between AI intended for scientific purposes than AI intended for games. I have more experience in game AI than traditional AI, so I will speak on that.

As for AI for games, the majority of game development is done currently in C++. You can use any language (some are certainly less ideal, though), including Java or C (two popular alternate choices for game AI).

Is C suited for game AI? It is for more traditional games, like board games. For example, in my game AI class I wrote a good checkers game in C.

If you are more comfortable in Java, there is no problem learning game AI in Java. The big thing is to learn the AI algorithms, with the actual language you use to implement them of secondary importance -- as it is in computer programming in general.

__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)

I would have to second the Perl / Python bit; they are both excellent languages for dealing with the Internet and processing data. Perl is arguably one of the most expressive languages ever made (if there is anything more expressive for general programming, it would probably have to be ASM or LISP). Python can often be used to produce maintainable code that also gets the job done painlessly, although the maintainability part depends on the monkey.

Perl is however a huge language syntactically, and Python has many standard modules to choose from. Java is a very simple language to learn IMHO, but like virtually every major language -- it pays to have a "stdlib" reference on hand. With C, the UNIX manual pages serve the purpose well enough (and a few Richard Stevens books won't hurt). Python & Perl provides pydoc and perldoc respective, both with great online docs. Java is also documented online -- use the parts you need, don't worry about memorizing java.foo.bar;

C is a very small language, and I know of nothing smaller... unless you want to start comparing some instruction sets & assemblers with it.

If you want to study AI, rather then just explore on your own; you'll probably need to learn some Lisp sooner or later. A good way to pick up a little lisp would be to grab a copy of the Scheme standard and SICP.

C often boils down to write your own or find code written by someone else; there are many great libraries (and many not so great ones) for most common tasks. The C-Strings for example, very simple and very useful, complete with many common functions0; but they are also a pain in the ass occasionally. C++'s std::string, Javas String, and Pythons str can often be more expedient -- in Perl, look for regular expressions.

Every language is like that, just pick what batteries you need and learn them.