Can anyone suggest reference books to start with AI? Preferably, I am looking for books that provide source code in Java or Python.
For a foundation, there is nothing better than Cybernetics by Norbert Wiener. It is surprising how advanced this MIT professor was, prior to Turing's thought experiment on a general purpose computing machine or the embodiment of the von Neumann architecture upon which most contemporary computers are based. In key ways his analysis of time series and stability in biological and electronic control systems is far enough before his time that most of academia has yet to catch up.
Moving forward to the 1990s, a clear picture of the achivements arising out of government funded work at MIT, Princeton, and other universites, along with the relationship between most of the key AI sub-fields is presented cleanly in, Mathematical Methods in Artificial Intelligence, by Edward A. Bender, 1996.
Moving into the machine learning sector of AI, the quintessential book arising from academics associated with Berkeley, Google, and the NSF is Foundations of Machine Learning Mohri, Rostamizadeh,and Talwalkar, 2012, MIT Press. It presents the PAC learning framework, which is important for any industrial strength machine learning, beyond the experimentation of a home computing hobbyist.
Two O'Reilly books are quite comprehensive: Hands-On Machine Learning with Scikit-Learn and TensorFlow by Géron and Deep Learning by Patterson and Gibson.
This overview of Java libraries is well written and the main Python libraries are Tensorflow, PyTorch, Scipy, Scikit-Learn, and a few others.
Both Java and Python implementations rely on wrappers in those languages that call underlying C/C++ for mapping tensor operations to acceleration hardware in emerging chips by VLSI manufacturers like NVidia and Intel. These architectures facilitate both parallelism and the division of AI algorithms between software and hardware.
This will improve the speed of experiments in learning. It is up to the student whether to take the time to develop an understanding on how to minimize convergence time during learning early or later in the course of study.