This book discusses the two fundamental elements that underline the science and design of artificial intelligence (AI) systems: the learning and acquisition of knowledge from observational data, and the reasoning of that knowledge together with whatever information is available about the application at hand. It then presents a mathematical treatment of the core issues that arise when unifying first-order logic and probability, especially in the presence of dynamics, including physical actions, sensing actions and their effects. A model for expressing causal laws describing dynamics is also considered, along with computational ideas for reasoning with such laws over probabilistic logical knowledge.