Skip to content
Snippets Groups Projects
cs101-csai-lec1.org 5.32 KiB

CS101 - Cognitive Science and Artificial Intelligence - Lecture 1

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 <william.waites@strath.ac.uk>

Room 12.20 Livingstone Tower

Who are your tutors

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

Marking Scheme

10%
Participation
30%
Assignment 1
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

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 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

git remote add gitlab
     https://oauth2:XXXX@gitlab.cis.strath.ac.uk/...

Push your work to the hosted repository

git push -u gitlab

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