Does anyone know a good book to buy for beginners to coding for artificial intelligence?
I have done some coding in Java and a little with Python, but I would be willing to learn a new language too.
Artificial Intelligence Stack Exchange is a question and answer site for people interested in conceptual questions about life and challenges in a world where "cognitive" functions can be mimicked in purely digital environment. It only takes a minute to sign up.Sign up to join this community
Introduction to statistical learning is sort of a resource for the tools that go into AI programming, with some exercises in R.
Elements of statistical learning is the more scientific and math / theory heavy version of ISL. I’m reading that one now.
They are both freely available from Stanford online at the links above.
The Direct Answer to Your Question:--
I recommend: Automate the Boring Stuff with Python: Practical Programming for Total Beginners.
" ... Does anyone know a good book to buy for beginners to coding for artificial intelligence? ... " ~ Stephen Messing (Stack Exchange user)
The key word here is beginners.
A very serious issue with people studying advanced topics is not having a strong base in the beginner topics. A house without structure will collapse. Follow these two principles:  step-by-step and  first things first.
Impatience is a very serious issue for folks starting off in A.I., as people can have expectations that do not match up with the actual field. A.I. is a demanding, intense field requiring intense dedication and study.
A solution to these problems is to supply a very practical and hands-on book that provides direct results upon applying the techniques therein but still reinforces the fundamentals.
So, with all of the above in mind and considered, I recommend Automate the Boring Stuff with Python: Practical Programming for Total Beginners.
Have a look at Programming Collective Intelligence (2007) by Toby Segaran. It is mainly about machine learning than conventional AI techniques, such as search algorithms or path planning.