Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#+title: CS101 - Cognitive Science and Artificial Intelligence - Lecture 1
#+startup: beamer
#+latex_class: beamer
#+latex_class_options: [14pt,aspectratio=169,hyperref={pdfpagelabels=false},svgnames]
#+latex_header_extra: \usetheme{strath}
#+latex_header_extra: \usepackage{tikz}
#+latex_header_extra: \usepackage{pgfplots}
#+latex_header_extra: \usepackage{filecontents}
#+options: toc:nil
* CS101 - Cog. Sci. and AI
** Today
- Preliminaries (who? what? where?)
- Yak Shaving
- A vintage psychotherapist chatbot
* What is this course about?
Selected topics in philosophy of mind, cognitive psychology,
computational linguistics, and artificial intelligence
Foundational concepts for thinking about cognition and intelligence
and understanding modern AI
Some mathematics and practical exercises
* Who am I?
_William Waites_
<[[mailto:william.waites@strath.ac.uk][william.waites@strath.ac.uk]]>
Room 12.20 Livingstone Tower
* Who are your tutors
- Adel Dadaa <[[mailto:adel.dadaa@strath.ac.uk>][adel.dadaa@strath.ac.uk]]>
- Pat Prochacki <[[mailto:pat.prochacki@strath.ac.uk][pat.prochacki@strath.ac.uk]]>
- Tochukwu Umeasiegbu <[[mailto:tochukwu.umeasiegbu@strath.ac.uk][tochukwu.umeasiegbu@strath.ac.uk]]>
* Where is this course?
*** Lecture:
Mondays 14:00-15:00 UC201
*** Labs:
Mondays 15:00-17:00 in LT1105, LT1201, LT1221, LT1320
* Where is this course?
** Topic 3 repository
- https://gitlab.cis.strath.ac.uk/xgb21195/cs101-csai
- Lecture slides, notes, videos, links to materials
** Mattermost
- https://mattermost.cis.strath.ac.uk/learning/channels/cs101-22-24
- Discussion, asynchronous Q&A, mutual assistance
* Subject matter
1. Software Engineering Tooling
2. Some Philosophical Experiments: Turing's Imitation Game, Searle's
Chinese Room, Weizenbaum's ELIZA, the "Engineering End-Run"
3. Symbol Manipulation and Logic: Before the AI Winter, Expert Systems
4. Probability and Text prediction: Statistical methods for text
processing and machine translation
5. Optimisation, Vector Spaces and Word embedding
6. Large Language Models, GPT etc
* Marking scheme
- 20% :: Assignment 2
- 20% :: Assignment 3
- 20% :: Assignment 4
* Groups or no groups
- Each student is responsible for their own assignments
- Working in groups is allowed but not required
* Yak Shaving
\begin{center}
\includegraphics[height=0.8\textheight]{./img/yak-shaving.jpg}
\end{center}
\begin{quotation}
\noindent\footnotesize Source: David Revoy -
\url{https://davidrevoy.com/article861}
\end{quotation}
* Assignment 1
/... to shave a yak/
* Goal
Submit coursework in a way that:
1. Has something to do with software development practice
2. Makes it possible to automate marking
We will not be using MyPlace, we will use the department Gitlab server
instead.
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
* Git...
- is a "distributed version control system"
- started as a tool for coordinating the Linux kernel development
- keeps your files /and their change history/
- has a /terrible/ user interface but is ubiquitous
* Git repositories
A /repository/ is a collection of /changes/ to files.
You create a repository /on your computer/.
You keep a copy of the repository on a hosting service.
A popular hosting service is [[https://github.com/][Github]] (Microsoft).
For this course, will use the department's service,
https://gitlab.cis.strath.ac.uk/
* Push, pull and clone
The word for "making a copy of a repository" is "clone".
To send changes from your computer to a remote repository, you "push"
them.
To get changes from a remote repository to your computer, you "pull"
them.
* More yak shaving
** Command line terminals
- Prompt, command, output
- Sort of an antique chatbot that doesn't even bother to try to speak
English!
- Somewhat cryptic commands...
* Command line basics
- pwd :: where am I? (what directory)
- hostname :: where am I? (which computer)
- ls :: list files
- cd :: change directory
- mkdir :: make directory
- cat :: show what is in a file
- git :: the git tool
- ssh :: get a terminal on a different computer
* Yet more yak shaving
** Text editors
- pico / nano (easy, terminal)
- *mousepad*, gedit, kate (easy, graphical)
- emacs, vi / vim (not easy)
- Notepad (on Windows)
- TextEdit (on MacOS)
- Many more, pluma, xed, Visual Studio Code, Atom, Pulsar, Spyder, Sublime Text,
Notepad++, CudaText, Textadept...
* Putting it together
- make a directory :: =mkdir cs101-coursework=
- change to it :: =cd cs101-coursework=
- make it a git repo :: =git init .=
- create / edit a file :: =$EDITOR assignment-1.txt=
- add that file to git :: =git add assignment-1.txt=
- commit the changes :: =git commit -m "first assignment"=
Now you have a git repository with one file in it on your computer.
* Sharing your repository (1)
Go to https://gitlab.cis.strath.ac.uk/
/web browser interlude/
1. Create a repository
2. Create an access token (note it down, you will need it)
3. Share it with me (xgb21195) as "reviewer"
* Sharing your repository (2)
Join the hosted repository to your local one
#+begin_src
git remote add gitlab
https://oauth2:XXXX@gitlab.cis.strath.ac.uk/...
#+end_src
Push your work to the hosted repository
#+begin_src
git push -u gitlab
#+end_src
* Sharing your repository (3)
Now you have a git repository with a file in it, and a copy on the CIS
gitlab server.
But I still do not know where it is! So I wrote a little program for
you to tell me. Run the program,
=/home/xgb21195/bin/cs101 https://gitlab.cis.strath.ac.uk/...=
* Finished yak shaving!
* A classic psychotherapist chatbot
A clone of Joseph Weizenbaum's ELIZA chatbot from the late 1960s
1. Open =emacs=
2. Type =M-x doctor=
(=M-x= means "meta-x". The "meta" key is ESC or Alt)
You can save a session to a file with =C-x C-s=, control-x and then
control-s. Using this file for assignment 1 will get top marks.
* Reading for next week
COMPUTING MACHINERY AND INTELLIGENCE, A. M. TURING, 1950
https://doi.org/10.1093/mind/LIX.236.433