Skip to content
Snippets Groups Projects
cs101-csai-lec1.org 6.39 KiB
Newer Older
#+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?

William Waites's avatar
William Waites committed
- Lecture    :: Mondays 14:00-15:00 RC426
William Waites's avatar
William Waites committed
- Zoom       :: https://strath.zoom.us/j/88271723449
- Meeting ID :: 882 7172 3449
- Password   :: 964919

*** Labs:
Mondays 15:00-17:00 in LT1105, LT1201, LT1221, LT1320

William Waites's avatar
William Waites committed
* Illness - COVID, Flu, etc

*If you are unwell do not come to lectures or labs*

* 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

- 10% :: Participation
- 30% :: Assignment 1 - Yak Shaving
- 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
William Waites's avatar
William Waites committed

* Lab work on Linux

- The CIS-managed computer labs on the 11th, 12th, and 13th floor of
  Livingstone Tower
- Remote graphical connection via https://guacamole.cis.strath.ac.uk/
- Remote terminal connection =ssh cafe.cis.strath.ac.uk=
- Documentation: https://docs.cis.strath.ac.uk/remote-compute/
  
* 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.
   
* 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