Description
Book SynopsisUnderstand the theory and implementation of simulation. This book covers simulation topics from a scenario-driven approach using Python and rich visualizations and tabulations.
The book discusses simulation used in the natural and social sciences and with simulations taken from the top algorithms used in the industry today. The authors use an engaging approach that mixes mathematics and programming experiments with beginning-intermediate level Python code to create an immersive learning experience that is cohesive and integrated.
After reading this book, you will have an understanding of simulation used in natural sciences, engineering, and social sciences using Python.
What You''ll Learn
Use Python and numerical computation to demonstrate the power of simulation
Choose a paradigm to run a simulation
Draw statistical in
Table of Contents
Chapter 1: Calculating Pi and Beyond: Searching Order in Disorder with Simulation [30]Description: The beginning chapter will use Monte Carlo simulation as a topic to introduce some fundamental concepts in simulation.Topics to be covered: 1. Simulating Pi2. The goat problem and uniform sampling3. How to properly set a simulation environment Chapter 2: Markov Chain: A Peek into the Future [20]Description: Markov chain simulation will be introduced from both probabilistic perspective and matrix multiplication perspective.Topics to be covered: 1. How to predict weather?2. The transition matrix and stability states3. Markov chain Monte Carlo simulation Chapter 3: Multi-Armed Bandits: Probability Simulation and Bayesian Statistics [30]Description: Classical multi-armed bandits’ model will be introduced to continue the probabilistic perspective of the previous chapter. In addition, Bayesian statistics will be introduced.Topics to be covered: 1. Introduction to multi-armed bandit2. Greedy versus explorative strategies3. The interpretation of a Bayesian statistician. Chapter 4: Balls in 2D Box: A Simplest Physics Engine [20]Description: This chapter is mainly about event-driven simulation. It is not about simulation in the time space but in the event space.Topics to be covered: 1. Introduce the physics laws that govern motion2. Use event-driven paradigm to build a physics engine3. More realistic simulation with friction Chapter 5: Percolation: Threshold and Phase Change [25]Description: Phase changing is an important physics behavior for systems near critical boundaries. We are going to simulate critical behaviors using percolation as examples.Topics to be covered: 1. The concept of percolation and 2. Why dimension matters: 1D percolation and 2D percolation3. 3D percolation and even higher dimensions
Chapter 6: Queuing System: How Stock Trades are Made [30]Description: As the first example in the business world, concepts in queuing systems are introduced and the simulation using basic data structures like queue and deque will be carried out.Topics to be covered: 1. Basic data structures in Python2. Microstructure of trading3. Simulating trading Chapter 7: Rock, Scissor and Paper: Multi-Agent Simulation [30]Description: Sometimes we want to simulate a system with multiple agents acting on their own behalf. In this chapter, we are going to run a multi-agent simulation and test the performance of different competing strategies in such a scenario.Topics to be covered: 1. Characteristics of multi-agent system2. Baseline strategies3. Analyzing nontrivial strategies
Chapter 8: Matthew Effect and Tax Policy: Why the Rich Keeps Getting Richer[30]Description: Differential equation is an important field of study that governs a big group of phenomena. In this chapter, we are going to study it with a very relevant topic: wealth distribution in modern society. Topics to be covered: 1. Introduction of differential equations2. Matthew effect and ROI3. How tax policy can gauge social wealth distribution Chapter 9: Misinformation Spreading: Simulation on a Graph (Centrality, Networkx)[30]Description: Network simulation is another important domain. Nowadays social media like Twitter, Facebook and reddit can be easily modelled as a network. We will cover a simple simulation to study how misinformation can spread in a network and how we can fight against it.Topics to be covered: 1. Concepts of a network
2. Simulate misinformation spreading in a directed network3. How to fight misinformation (or suppress freedom of expression)
Chapter 10: Simulated Annealing and Genetic Algorithm [30]Description: There are two simulation algorithms widely used in research and industry that mimic natural phenomena. We are going to use them to solve two real world problems and explain the origin of their power.Topics to be covered: 4. Simulated Annealing Basics5. Use Simulated Annealing to solve an optimization problem6. Genetic Algorithm7. Use Genetic algorithm to solve an optimization problem