AI programming exercises
A series of online AI programming exercises.
For use in any AI course.
Each step has:
(a) a running online program to implement some AI concept,
(b) a video introduction,
(c) notes to explain the program,
and: (d) exercises for students to do.
Students can edit and run these programs in the browser, with no install.
These exercises are based on AI programs by Daniel Shiffman of
The Coding Train and
The Nature of Code.
Ported with permission under MIT licence.
The exercises involve making modifications to a series of AI programs (called "Worlds" on Ancient Brain), including the following Worlds. Click images to run them.
Before you start: Do the Ancient Brain Tutorial
Contents
- Binary tree
- Breadth-first search
- Breadth-first search (graphical)
- A* search
- Genetic Algorithm
- Genetic Algorithm for TSP
- Perceptron
- Neural network for XOR
- Character recognition neural network
Bonus World: Chat GPT
The following World calls the
OpenAI
API to talk to
GPT-3.5.
We do not have exercises for this World but you could think of some:
Chat with GPT model 962 runs ♦ 3 likes
By
Starter user Created: 18 Sep 2023
Modified: 3 Oct 2023
JavaScript page to chat with a GPT model. Calls OpenAI API. User needs to enter API key.
Credits
Notes
- Code runs on the Ancient Brain platform.
Students copy, edit and run the code in the browser, with no install.
- Students are given coding challenges in the notes.
- Teachers can run and examine student code in the browser, with no risk, and no install.
- These exercises have already been used in an M.Sc. course in AI.
- As always, use the
Docs menu for help when coding on Ancient Brain.
Preview
As a preview, here is the video for the
Genetic Algorithm exercise.
Notes on videos
- The videos feature Dr. Mark Humphrys of Dublin City University.
They were made originally for an M.Sc. course.
- They contain a few things that do not apply outside of the M.Sc. course.
You will work it out.
- The videos may show an older version of the Ancient Brain site.
- Maximise video to see text and code clearly.
- Credit to Ideas Lab at NIDL at DCU for their superb video editing.
AI exercises, not an AI course
This is
not a full AI course. It does not introduce you to AI theory, which would be a huge undertaking.
To learn AI theory, you need to do a course elsewhere.
Rather, this is a series of AI programming exercises that teachers and lecturers can use in AI courses,
and that students can use to try out the AI theory they have learnt.
Get started: