CSI 4106 - Fall 2026
Version: Sep 11, 2026 12:09
Joëlle Pineau — an AI leader from Ottawa
Cohere raises US$500-million, hires former Meta AI expert Joelle Pineau, Joe Castaldo, The Globe and Mail, 2025-08-14.
Calendar description
The roots and scope of Artificial Intelligence. Knowledge and knowledge representation. Search, informed search, adversarial search. Deduction and reasoning. Uncertainty in Artificial Intelligence. Introduction to Natural Language Processing. Elements of planning. Basics of Machine Learning.
To the larger community of computer science and information technology, AI is usually identified by the techniques grown from it, which at different periods may include theorem proving, heuristic search, game playing, expert systems, neural networks, Bayesian networks, data mining, agents, and recently, deep learning.
Good Old-Fashioned AI (GOFAI) relied on hand-crafted knowledge engineering, but it has been largely displaced by machine learning due to the increased availability of data, computing resources, and new algorithms.
Deep learning has significantly impacted various domains, including natural language processing, robotics, and computer vision.
However, deep learning has current limitations, particularly in reasoning, where symbolic AI excels and could potentially offer valuable insights.
Andrew Ng, The Batch, April 10, 2024
Many software developers worry that large language models will make human coders obsolete. We doubt that AI will replace coders, but we believe that coders who use AI will replace those who don’t.
Richard Feynman
What I cannot build. I do not understand.
This will be my third iteration of this content. Your help identifying what works and what doesn’t will be most appreciated.
CSI 4106 is an introductory course on artificial intelligence, offering a brief overview of various topics within this broad field. Each topic covered could be explored in much greater depth through one or more graduate-level courses. The primary objective of CSI 4106 is to provide students with a foundational understanding of the core areas that constitute artificial intelligence.
Overlaps with other courses are inevitable, but I will do my best to keep it at a minimum.
This is not a course on the impact of AI on society, including ethics, fairness, trust and safety.
(for your information only)
The Towers of Hanoi is a puzzle that consists of three pegs and a number of disks of different sizes. The puzzle starts with all the disks stacked in decreasing size on one peg, and the goal is to move the entire stack to another peg, following these rules:
D1, D2, D3, P1, P2, P3 are symbols, where D1, D2, and D3 are disks, and P1, P2, and P3 are pegs.
Given a few facts about who is parent of whom (symbols) and a handful of Horn-clause rules, infer new relations (e.g., ancestor, siblings, grandparent) by logical deduction.
Given course prerequisites and a student’s completed set, infer which courses they can take next. This shows symbolic constraint reasoning.
Artificial neural networks (ANNs) are computational models loosely inspired by biological neural systems. They consist of interconnected computational units with weighted connections.
During training, their parameters, including connection weights, are adjusted to improve performance on a specified objective.
Knowledge is encoded in the network’s parameters and patterns of activity, rather than primarily as explicit facts and rules.
Perceptions and Attitudes Toward Artificial Intelligence.
Enhancing Clarity and Communication: Establishing a mutual understanding of evaluation criteria, benchmarking tests, and milestones.
Addressing Ethical, Social, and Legal Implications: Enabling policymakers to develop regulations that minimize AI-related risks.
To the larger community of computer science and information technology, AI is usually identified by the techniques grown from it, which at different periods may include theorem proving, heuristic search, game playing, expert systems, neural networks, Bayesian networks, data mining, agents, and recently, deep learning.
User: The man and the goat want to enjoy a picnic near a river, but there’s a wolf. What to do with the zucchini?
ChatGPT 5: You’ve got the classic river‐crossing (wolf–goat–cabbage ⇒ here, zucchini).
Boat carries you + one item. Unsafe pairings: wolf with goat; goat with zucchini.
Minimal plan:
- Take goat over.
- Return alone.
- Take wolf over.
- Bring goat back.
- Take zucchini over.
- Return alone.
- Take goat over.
Conclusion: keep the zucchini never alone with the goat; ferry it on step 5.
Attribution: Andriy Burkov, published on LinkedIn August 2025.
User: Surgeon but child, hopsital, it have a no, why it so?
ChatGPT 5: You’re pointing to the classic riddle:
Car crash → injured child → surgeon says “I can’t operate—this is my child.”
Resolution: the surgeon is the child’s mother (or another parent in a non-heteronormative family).
The “paradox” arises from implicit gender assumptions about surgeons.
Attribution: Andriy Burkov, published on LinkedIn 3 weeks ago.
“Artificial” pertains to the creation of entities or phenomena that mimic natural processes using technology or synthetic materials, a definition broadly recognized and accepted.
Therefore, defining “artificial intelligence” fundamentally requires us to first clarify what we mean by “intelligence.” Surprisingly, “[d]espite a long history of research and debate, there is still no standard definition of intelligence.” (Legg and Hutter 2007)
What are the characteristics you associate with intelligence?
“Intelligence is a very general mental capability that, among other things, involves the ability to reason, plan, solve problems, think abstractly, comprehend complex ideas, learn quickly and learn from experience.”
Russell and Norvig considers two axes: thinking vs behaviour, human vs rationality.
| Thinking | Acting | |
|---|---|---|
| Human-like | thinking humanly (simulation) | acting humanly (Turing test) |
| Rationality | thinking rationally (logic) | acting rationally (agent) |
Rationality involves the evaluation of choices to achieve a goal or to find the optimal solution to a problem. Simon (1972, p. 161) defined rationality as “a style of behavior that is appropriate to the achievement of given goals, within the limits imposed by given conditions and constraints.”
Artificial general intelligence (AGI) refers to a form of artificial intelligence (AI) that either equals or exceeds human proficiency across a diverse array of cognitive functions.
I repeat, there is nothing wrong with narrow AI.
«Two papers in this week’s issue dramatically expand our structural understanding of proteins. Researchers at DeepMind, Google’s London-based sister company, present the latest version of their AlphaFold neural network.»
(\(\ldots\)) as soon as a computer system is built to solve a problem successfully, the problem is no longer “only solvable by the human mind,” so does not need intelligence anymore. Consequently, “AI is whatever hasn’t been done yet” (Hofstadter, 1979; Schank, 1991), which is known as “the AI Effect” (McCorduck 2004).
McKinsey research estimates that gen AI could add to the economy between $2.6 trillion and $4.4 trillion annually while increasing the impact of all artificial intelligence by 15 to 40 percent.
In fact, it seems possible that within the next three years, anything not connected to AI will be considered obsolete or ineffective.
AI expert Kai-Fu Lee predicts that its impact will be “more than anything in the history of mankind.”
Can the concept of intelligence be considered independently of the entities that express it? This is the problem of embodiment.
Can a machine exhibit human-level intelligence?
Is it possible to dissociate the following concepts from that of intelligence?
Can an AI suffer?
Rouleau, N. & Levin, M. (2024). Discussions of machine versus living intelligence need more clarity. Nature Machine Intelligence, 6(12), 1424–1426.
An agent and its interaction with the environment are specified as a tuple: \[ \langle P,S,A \rangle \] where
For a sequence of moments, \(0,\ldots,t\).
AI is conceived as computer systems that are similar to the human mind in a certain sense, though a computer and a human mind cannot be identical in all aspects.
\[ \langle P^H,S^H,A^H \rangle \approx \langle P^C,S^C,A^C \rangle \]
Wang (2019) proposes 5 perspectives: Structure-AI, Behavior-AI, Capability-AI, Function-AI, and Principle-AI.
(brain modelling, cognitive science)
I call this type of definition “Structure-AI,” since it requires an AI system to go through isomorphic states or structure changes as the brain does when they are given similar input, which will produce similar output, so the three components of the two are pairwise similar to each other:
\[ P^H \approx P^C, S^H \approx S^C, A^H \approx A^C \]
(Turing Test)
One way to acknowledge a human-like mind without demanding a human-like brain is to associate intelligence to the external behaviors of the agent. After all, if an agent behaves like a human, it should be considered as intelligent, no matter whether it looks like a human, either inside or outside.
\[ P^H \approx P^C, A^H \approx A^C \]
In the agent framework, it means that \(C\) is similar to \(H\) in the sense that there are moments \(i\) and \(j\) that:
\[ p_i^C \approx p_j^H, a_i^C \approx a_j^H \]
the action (solution) the computer produces for a percept (problem) is similar to the action produced by a human to a similar percept (\(\ldots\)) In this way, the intelligence of a system is identified by a set of problems it can solve, while whether they are solved in the “human way” does not matter.
“I suggest we replace the Turing test by something I will call the ‘employment test.’ To pass the employment test, AI programs must be able to perform the jobs ordinarily performed by humans. Progress toward human-level AI could then be measured by the fraction of these jobs that can be acceptably performed by machines”
In the agent framework, this “Function-AI” perspective takes \(C\) to be similar to \(H\) in the sense that there are moments \(i\) and \(j\) that:
\[ a_i^C \approx f^C(p_i^C), a_j^H \approx f^H(p_j^H), f^C \approx f^H \]
Here the function can correspond to searching, reasoning, learning, etc., and since the focus is on the functions (i.e., input-output mappings), the concrete input and output values of the two agents do not have to be similar to each other.
As in any field, there are researchers in AI trying to find fundamental principles that can uniformly explain the relevant phenomena. Here the idea comes from the usage of intelligence as a form of rationality (\(\ldots\)) that can make the best-possible decision in various situations, according to the experience or history of the system.
\[ A^C = F^C(P^C), A^H = F^H(P^H), F^C \approx F^H \]
The above \(F\) is often not formally specified, but described informally as a certain “principle,” which is not merely about a single type of problem and its solution, but about the agent’s life-long history in various situations, when dealing with various types of problems.
#!/usr/bin/env python3
# -*- Mode: Python -*-
# ai_lecture-01.py
# Author : Marcel Turcotte & ChatGPT 5
# Created On : Tue Feb 13 16:29:41 2024
# Last Modified By: Marcel Turcotte
# Last Modified On: Sun Sep 6 09:58:08 EDT 2026
# The initial version of this script was developed in 2024.
# In 2025, ChatGPT was used to revise the code to align with the
# latest API version, expand the comments to improve its instructional value,
# and enhance its suitability as a teaching example. In 2026, the script was
# further updated using Codex ChatGPT 5.6 Sol.
# Attempts to use Codex ChatGPT 6 Astra Light were disappointing.
"""Generate bilingual narration and speech for the first lecture.
The script uses the OpenAI API to write an English narration, translate it
into Canadian French, and synthesize both versions as audio files.
Required:
python -m pip install openai
OPENAI_API_KEY can be exported by the shell or injected by a secret manager:
export OPENAI_API_KEY="your_api_key_here"
python ai_lecture-01-v04.py --voice marin
With a 1Password environment file containing a secret reference:
op run --env-file="$HOME/.env" -- python ai_lecture-01-v04.py --voice marin
Optional .env support:
python -m pip install python-dotenv
Keep API keys private and exclude .env files from version control.
When presenting the recordings, disclose that the voices are AI-generated.
"""
from __future__ import annotations
import argparse
import os
import sys
from pathlib import Path
from typing import Optional
from openai import (
APIConnectionError,
APITimeoutError,
AuthenticationError,
OpenAI,
OpenAIError,
RateLimitError,
)
try:
from dotenv import load_dotenv
except ImportError:
load_dotenv = None
TEXT_MODEL = "gpt-4o"
SPEECH_MODEL = "gpt-4o-mini-tts"
WELCOME_SENTENCE = 'Welcome to CSI 4106, "Introduction to Artificial Intelligence"!'
# Quoted verbatim from the official uOttawa calendar.
OFFICIAL_CALENDAR_DESCRIPTION = (
"The roots and scope of Artificial Intelligence. Knowledge and knowledge "
"representation. Search, informed search, adversarial search. Deduction and "
"reasoning. Uncertainty in Artificial Intelligence. Introduction to Natural "
"Language Processing. Elements of planning. Basics of Machine Learning."
)
TEACHING_APPROACH = (
"The calendar description establishes the broad scope of the course rather than its "
"teaching order. This offering uses a modernized, machine-learning-first structure and "
"introduces deep learning as early as the necessary foundations allow. Deep learning "
"is central to contemporary AI, so studying it early connects the course with "
"technologies that attract students' attention. It also provides a framework for "
"introducing and defining central AI ideas. We will examine cases in which deep "
"learning has displaced or changed the role of earlier approaches, as well as cases "
"in which its limitations make earlier, purpose-built methods valuable. A further "
"motivation is to treat learning as an early and extensively studied milestone in the "
"development of intelligence. This foundation will later help us compare learning-based "
"and search-based approaches when studying Monte Carlo Tree Search."
)
LEARNING_OUTCOMES = (
"Explain the fundamental concepts of Artificial Intelligence (AI)",
"Apply problem-solving strategies using AI techniques",
"Critically analyze and compare different AI approaches",
"Demonstrate independent learning and exploration",
)
PRELIMINARY_COURSE_OUTLINE = (
"Defining AI",
"Introduction to machine learning",
"Linear regression",
"Training",
"Logistic regression",
"Evaluation",
"Hyperparameter tuning",
"Machine learning engineering",
"Introduction to artificial neural networks",
"Backpropagation",
"Softmax, cross-entropy, and regularization",
"Convolutional neural networks",
"Introduction to search",
"Informed search",
"Local search",
"Population-based metaheuristics",
"Adversarial search",
"Monte Carlo Tree Search",
)
# -------------------------------------------------------
# Setup
# -------------------------------------------------------
def prepare_api_key() -> bool:
"""Load an optional .env file and check for an API key."""
if not os.getenv("OPENAI_API_KEY") and load_dotenv is not None:
load_dotenv(override=False)
api_key = os.getenv("OPENAI_API_KEY", "")
if api_key.startswith("op://"):
print(
"OPENAI_API_KEY is an unresolved 1Password reference. Run:\n"
f' op run --env-file="$HOME/.env" -- python {Path(__file__).name}',
file=sys.stderr,
)
return False
if not api_key:
print(
"No OpenAI API key was found. You can:\n"
" • export OPENAI_API_KEY=\"your_api_key_here\"\n"
" • use a secret manager to inject OPENAI_API_KEY\n"
" • install python-dotenv and store the key in a local .env file\n\n"
"An exported key or a secret manager does not require python-dotenv.",
file=sys.stderr,
)
return False
return True
# -------------------------------------------------------
# Prompt builders
# -------------------------------------------------------
def build_course_context() -> str:
"""Organize the source material while keeping its roles unambiguous."""
outcomes = "\n".join(f"- {outcome}" for outcome in LEARNING_OUTCOMES)
outline = "\n".join(
f"{number}. {topic}"
for number, topic in enumerate(PRELIMINARY_COURSE_OUTLINE, start=1)
)
return f'''REQUIRED OPENING SENTENCE:
{WELCOME_SENTENCE}
OFFICIAL UOTTAWA CALENDAR DESCRIPTION:
{OFFICIAL_CALENDAR_DESCRIPTION}
INSTRUCTOR'S DESIGN FOR THIS OFFERING:
{TEACHING_APPROACH}
LEARNING OUTCOMES:
Upon completion of the course, students will be able to:
{outcomes}
PRELIMINARY AND AMBITIOUS COURSE OUTLINE:
{outline}'''
def build_instructions_en(tone: Optional[str]) -> str:
"""Build instructions for the English narration."""
instructions = (
"Write a natural spoken welcome of 180 to 240 words for the first lecture of an "
"undergraduate AI course at the bilingual University of Ottawa. Begin with the "
"required opening sentence exactly as supplied. Clearly identify the calendar "
"paragraph as the official uOttawa course description, then explain that this "
"offering uses a modernized, machine-learning-first structure and reaches deep "
"learning as early as its foundations permit. Do not present the calendar "
"description as the teaching sequence or the preliminary outline as official "
"calendar text. Explain both reasons for teaching deep learning early: its "
"importance to current AI and its use as a framework for discussing other AI "
"ideas. Contrast cases where deep learning has changed earlier approaches with "
"cases where its limitations make specialized methods valuable. State all four "
"learning outcomes naturally, preserving their action verbs. Describe the "
"preliminary and ambitious sequence as an arc from machine-learning foundations "
"through neural networks and then search, ending with Monte Carlo Tree Search; do "
"not recite all eighteen topics. Do not imply that deep learning is a prerequisite "
"for Monte Carlo Tree Search. The students have varied backgrounds, languages, and "
"prior exposure to AI. Be welcoming, inclusive, clear, and encouraging. Use plain "
"language and short sentences. Return only the narration."
)
if tone:
instructions += f" Writing style: {tone}"
return instructions
def build_instructions_fr() -> str:
"""Build instructions for the Canadian French translation."""
return (
"Translate the supplied English narration into natural Canadian French. "
"The University of Ottawa is bilingual, and CSI 4506 is the French-language "
"course corresponding to CSI 4106. Replace 'CSI4106' or 'CSI 4106' with "
"'CSI 4506'. Translate the course title as 'Introduction à l’intelligence "
"artificielle'. Preserve the distinction between the official calendar description "
"and the way this offering is organized, along with all other ideas and the "
"welcoming tone. Return only the translation."
)
def build_speech_instructions(language: str, tone: Optional[str]) -> str:
"""Build language-specific delivery instructions."""
if language == "en":
instructions = (
"Speak as a welcoming university instructor. Use natural Canadian English, "
"a conversational tone, and a measured pace. Pause briefly between the main "
"ideas. Pronounce 'CSI 4106' as 'C S I four one zero six'."
)
else:
instructions = (
"Parlez comme une personne qui accueille sa classe à l’université. Utilisez "
"un français canadien naturel, un ton chaleureux et un débit mesuré. Faites "
"une courte pause entre les idées principales. Prononcez « CSI 4506 » comme "
"« cé esse i, quatre cinq zéro six »."
)
if tone:
instructions += f" Additional delivery instruction: {tone}"
return instructions
# -------------------------------------------------------
# OpenAI utilities
# -------------------------------------------------------
def generate_text(client: OpenAI, source: str, instructions: str) -> str:
"""Generate text with the Responses API."""
response = client.responses.create(
model=TEXT_MODEL,
instructions=instructions,
input=source,
temperature=0.2,
max_output_tokens=800,
)
return (response.output_text or "").strip()
def synthesize_speech(
client: OpenAI,
text: str,
output_path: Path,
*,
voice: str,
instructions: str,
response_format: str,
) -> None:
"""Stream synthesized speech to an audio file."""
with client.audio.speech.with_streaming_response.create(
model=SPEECH_MODEL,
voice=voice,
input=text,
instructions=instructions,
response_format=response_format,
) as response:
response.stream_to_file(output_path)
# -------------------------------------------------------
# Script logic
# -------------------------------------------------------
def main(audio_format: str, voice: str, tone: Optional[str]) -> int:
"""Generate English and French narrations and audio files."""
if not prepare_api_key():
return 1
course_context = build_course_context()
try:
client = OpenAI()
narration_en = generate_text(
client, course_context, build_instructions_en(tone)
)
if not narration_en:
print("The text model returned an empty English narration.", file=sys.stderr)
return 1
narration_fr = generate_text(
client, narration_en, build_instructions_fr()
)
if not narration_fr:
print("The text model returned an empty French translation.", file=sys.stderr)
return 1
narrations = (
("en", narration_en),
("fr", narration_fr),
)
for language, narration in narrations:
output_path = Path(
f"01_tts_course_intro-{language}-{voice}.{audio_format}"
)
synthesize_speech(
client,
narration,
output_path,
voice=voice,
instructions=build_speech_instructions(language, tone),
response_format=audio_format,
)
print(f"[OK] {language.upper()} audio → {output_path}")
except AuthenticationError:
print(
"OpenAI rejected the API key. Check OPENAI_API_KEY or the secret manager.",
file=sys.stderr,
)
return 1
except (APIConnectionError, APITimeoutError) as error:
print(f"Could not reach the OpenAI API: {error}", file=sys.stderr)
return 1
except RateLimitError:
print(
"The request was rate-limited. Check the account's limits and API credit.",
file=sys.stderr,
)
return 1
except OpenAIError as error:
print(f"OpenAI API error: {error}", file=sys.stderr)
return 1
except OSError as error:
print(f"Could not write an audio file: {error}", file=sys.stderr)
return 1
print("Reminder: disclose that the narration uses AI-generated voices.")
return 0
# -------------------------------------------------------
# Command-line interface
# -------------------------------------------------------
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Generate bilingual first-lecture narration and speech."
)
parser.add_argument(
"--format",
default="mp3",
choices=("mp3", "wav", "aac", "flac", "opus", "pcm"),
help="Audio output format (default: mp3).",
)
parser.add_argument(
"--voice",
default="marin",
help="Speech voice (default: marin). Try cedar or nova.",
)
parser.add_argument(
"--tone",
default=None,
help=(
"Optional writing and delivery instruction, for example: "
"'Sound warm, calm, and optimistic.'"
),
)
args = parser.parse_args()
raise SystemExit(main(args.format, args.voice, args.tone))Marcel Turcotte
School of Electrical Engineering and Computer Science (EECS)
University of Ottawa