Chapter 1 - Introduction to AI

Updated 4 Oct 2026

1.1 What is Artificial Intelligence?

Artificial Intelligence (AI) is the science of making systems that:

Act like peopleThink like people
- Turing test
- Chatbots
- Cognitive science
- Neuroscience
Think rationallyAct rationally Does the right thing
- Logic
- Correct thought process
- Act according to a pre-defined performance measure

3, 4 คือไม่อยากให้ Think like people แต่อยากให้ Think rationally (based on logic, correct thought process) ประมาณนี้

1.2 Turing Test

  • อันนี้จะเข้ากับ Act like people ในหัวข้อข้างบน

  • Alan Turing addressed the problem of AI in his paper titled "Computing Machinery and Intelligence" in 1950.

  • He suggested that the question 'Can machines think?' can be answered by observing the behavior of the machine.

    • He then proposed the 'imitation game', which is later called 'Turing test', to test a machine's ability to exhibit intelligent behavior.

How the Turing Test Works

A Human Interrogator (C) asks any type of question to both the Human Respondent (B) and the Machine Respondent (A) to determine either A or B is the machine. The Machine (A) tries to convince C that it is a human. If B consistently fools C, it is considered to have "passed" the test.

1.3 Rational Agents

  • The 'Act Rationally' approach focuses on building a rational agent which acts so as to accomplish the best expected outcome by using various techniques.
  • An agent is anything that possesses sensors to accept inputs from the environment, and responses to the environment through its actuators. Each agent has an agent function to control its behavior.
    • Definition ของมันค่อนข้าง Flexible นะ จะเป็น Robot, System อะไรซักอย่างก็ได้

1.3.1 Rationality

  • A rational agent is an agent that does the right thing. Each rational agent has a performance measure defining the criteria of success. It evaluates sequences of environment states.

Rational Agent=(Performance Measure) + (Environment) + (Actuators) + (Sensors)\text{Rational Agent} = \text{(Performance Measure) + (Environment) + (Actuators) + (Sensors)}

  • A rational agent focuses only on maximizing its expected performance measures. Rationality is not omniscience. It does not need to maximize the real performance.
    • คือแค่เก่งในเรื่องของตัวเอง หรือตาม Measure ของตัวเอง ไม่จำเป็นต้องรอบด้าน รู้ทั้งหมด
    • อย่าง Automated Taxi ไม่จำเป็นต้องกังวลเรื่องของจะตกมาจากท้องฟ้า

  • Example: An automated taxi does not need to drive (badly) like a real taxi driver, but it should maximize its performance i.e. safety, following traffic rules, profit, and customer convenience, etc. This automated taxi does not need to be omniscience. It may not be able to avoid some objects falling from the sky.

1.4 Good Old Fashioned AI (Symbolic AI)

  • Two types of AI technique

  • Good Old Fashioned AI (GOFAI) considers a brain as a machine for processing symbols. The techniques rely on using search algorithms to find appropriate solutions. Heuristic functions have been developed to cope with the huge solution space.

    • Example; Deep Blue, a chess-playing system developed by IBM, is one of GOFAI successes. It defeated the World Chess champion in 1997.

Game Tree Search in Chess

The following shows a game tree of a chess game:

  • Each node is a state of the game
  • Each edge is a possible move
  • The root node is the initial state of the game
  • The leaf nodes are the terminal states of the game
  • The value of each non-terminal node is the evaluation of the game state based on the values of its children
  • A search algorithm is used to find the best move
    • แล้วก็ต้องเร็วถูกมะ ถ้าจะให้เลื่อน 1 move แล้วคอมคิดเป็นชั่วโมงก็พังเถอะนะ!

สุดท้ายจะได้เป็น Tree, generate every possible move!

1.5 Connectionist AI

  • Artificial Neural Network is one of the most popular technique in the Connectionist AI. A network, composing of multiple layers of neurons, transforms input signals into an output.
  • The algorithm does not require a model of the world. It requires labeled pairs of input and preferred output.

Neural Network Architecture Example

  • Recent advances in the deep learning technique combining with accessing to Big Data and high speed computers enabled the development of various highly accurate machine learning applications.
  • Deep Learning thus becomes a hot topic among AI researchers and wide range of users. It can be considered the most recent approach of AI.

  • Example; AlphaGo, a Go-playing system developed by Google DeepMind, is one of the most successful application of deep learning. It defeated the World Go champion in 2016.
    • AlphaGo uses a combination of deep neural networks and Monte Carlo tree search to evaluate the game state and find the best move.

1.6 Comparing GOFAI and Connectionist AI

GOFAI มันไม่ต้องใช้ Data ในการ Train, จะใช้เป็นเหมือน Condition inside แทน ห้ามเลื่อนไปตรงนี้นะ

AspectGOFAIConnectionist AI
ParadigmSymbolic reasoning and rule-based logicSub-symbolic, data-driven pattern recognition
RepresentationUses explicit symbols and rules (e.g., IF...THEN)Uses distributed numerical representations (weights)
Knowledge EncodingManually encoded by humansLearned from data
Reasoning ProcessLogical inference, search, and planningStatistical approximation and function mapping
InterpretabilityHigh (transparent rules and steps)Low (black-box behavior)
Example TechniquesLogic programming, rule-based systemsDeep learning, backpropagation, CNNs, RNNs
StrengthsPrecise, explainable, good for structured problemsRobust, generalizable, handles noisy/unstructured data
WeaknessesBrittle, hard to scale, poor with ambiguous inputDifficult to interpret and debug

ถ้ามันเป็น Black box ไม่รู้ว่ามันทำงานยังไง แล้วเราสามารถ Improve มันได้ยังไง อย่าง GPT-4, GPT-5 เขาไปปรับในส่วนไหน? หรือแค่ Train Data มากขึ้น?


Contents

1.7 What will we study in this course?

We will study various AI techniques from both GOFAI and Connectionist AI approaches.

GOFAI Topics

  • Informed Search
  • Local Search
  • Adversarial Search
  • Probability Theory
  • Bayesian Network

Artificial Neural Networks Topics

  • Perceptrons
  • Gradient Descent & Multi-Layer Perceptrons
  • Deep Neural Networks
  • Convolutional Neural Networks
  • Recurrent Neural Networks
  • Unsupervised Learning