Introduction to Computer Science · week 1

What is
Intelligence?

A first-semester class, in fourteen weeks, that answers its title with a definition — and earns it.

proof · notation · syntax  ·  truth · meaning · semantics

What this class is for

A deep understanding of the basic principles — deep enough to position generative AI, and whatever comes next, properly.

Not how to use a device. Not how to prompt a chat bot. Not even, mainly, how to code.

The principles were true before this technology arrived and will still be true after whatever replaces it. That is why they are worth a semester, and why nothing in this class mentions a product, a vendor, or a year.

By the end you will be able to say, about any machine that talks, exactly what it is and exactly what it cannot be — and to check the answer yourself.

The question

Is it intelligent? — badly posed, as the talk said. We replace it with questions you can answer: what language, what semantics, what metric, what budget, who checks.

The short answer

Intelligence is developing new formal languages — or new properties in existing ones — which requires discovering and understanding promising unproven truth. Fourteen weeks to earn it.

The axis

Everything in this class sits somewhere on one line.

the six stations of the semester

Finite. Bits, and how fast a few of them outnumber the atoms in the universe. Week 2 and 3.

Countable. Everything you can write down: programs, proofs, machines — and the machine that reads them. Weeks 4 to 6.

Uncountable. What you mean by it. Behaviours, truths. Cantor, Gödel, Turing, Rice — then the compiler and the operating system built anyway. Weeks 7 to 10. Then cost, machines, and the answer.

Fourteen weeks

The route.

wkstationlecturelive in the terminal
1What is Intelligence? The talk, then this./selfie
2ISize: bits, orders of magnitude, state spaces-c selfie.c
3IEverything is bits: numbers, text, kilo vs kibiexamples/
4IINotation: formal languages, EBNF, C* and RISC-U-s
5IICountability: a binary is a number; the fixed pointmake self-self-check
6IIThe machine: RISC-U, mipster as the universal machinemake emu, -d
7IIIUncountability: the diagonal, twice; truths without proof
8IIISelf-reference I: the compiler, the fixed point, Gödelmake self
9IIISelf-reference II: halting, universality, Rice-d on a loop
10IIISystems: OS by emulation ≡ OS by virtualizationmake emu-emu, os-emu
11IVCost: P vs NP, SAT, a solver in 400 lines, Landauermake sat
12IVFormal methods: machine code in, formula outmake rotor, bitme
13VMachines: what an LLM is; hallucination; the gatea prompt, and a compiler
14VIWhat is intelligence? The definition; the exam
The specimen

One file, small enough to read to the end: selfie.

A compiler for a tiny subset of C, an emulator for a tiny subset of RISC-V, and a hypervisor — twelve thousand lines, one file, written in the language it compiles.

Three commands: the compiler compiles itself, the emulator executes itself, the hypervisor hosts itself. Understand the first and you understand compilers; the second, machines; the third, operating systems.

And a workshop of tools around it that turn a program into a logical formula and hand it to a solver — where this class meets the frontier, in week 12.

$ ./selfie -c selfie.c -o selfie1.m -m 2 -c selfie.c -o selfie2.m ./selfie: selfie compiling selfie.c to 64-bit RISC-U with 64-bit starc ./selfie: 64-bit mipster executing 64-bit RISC-U binary selfie1.m with 2MB physical memory selfie1.m: selfie compiling selfie.c to 64-bit RISC-U with 64-bit starc $ diff -s selfie1.m selfie2.m Files selfie1.m and selfie2.m are identical
Before next week

Install selfie, and run it once.

  1. Get a terminal. Every laptop has one; if you only have a browser, the repository's README shows the cloud option.
  2. Download selfie from github.com/cksystemsteaching/selfie and type make in its directory. You need a C compiler; the README says which.
  3. Type ./selfie. It answers with its synopsis, one line, in a formal language. Bring that line to week 2.
  4. Read the introduction of the book, and the Selfie chapter, and type the two commands in it.
The book

What is Intelligence? — this class is its first six parts at talk resolution, one chapter per week or so. It is in the repository under book/.

Exercises

This class has no formal assignments. It has a recommended exercise list per week — reading, the commands of the session to rerun, a few paper exercises — and one thing to try on the autograder, which is how the compiler and systems classes are graded.

How to read this class

Slow yourself down.

Formal languages are not casual. Everything matters, even the tiniest detail, and the trick to learning them is to take steps so small they are almost painful.

Every negative result in this class — there are five — is read twice: what it forbids, and what it opens. The second reading is the one to remember.

Whatever intelligence is, humour is the only way.the last slide of the talk, and of week 14