Assignment 1: Python Warm-up and Introduction to Language Models
CSE 473: Introduction to Artificial Intelligence
The University of Washington, Seattle, Spring 2023
See the "Late Addition" section below, posted on March 31.
 
INDIVIDUAL WORK. Do both Part 1A and Part 1B.

1A. Python Warm-up

Either (1) access Jupyter Notebooks on the UW-IT website (UW-IT has agreed to make it available in CSE 473; this link goes there.), OR (2) install Jupyter and the latest compatible Python on your own computer OR (3) use Google Colab (a web IDE for Python).

If you have Python and pip already installed on your computer, you may be able to install Jupyter by typing

pip install notebook
  

If you choose to use Google Colab, access it at this URL: https://colab.research.google.com/drive/1aTGvMHz3MtAfYCyQ_a4AvB5ItVWZiPyb?usp=sharing.

If you are new to Python, make use of your instructor's Python as a Second Language tutorial. If you would like a good tutorial on working with Jupyter notebooks, we recommend this 30-minute YouTube video by Corey Schafer. Then use this assignment's provided Jupyter notebook files to go through several Python exercises, and then write a program to process a text file, prepare a table of bigram counts, a table of P(w2 | w1) values, and create a generator.

Apply it to two corpora provided in the starter files archive.

Turn in your solution files (as Jupyter notebooks) to GradeScope under Assignment 1 Part A.

(Late addition:)

Submit your completed .ipynb file. Make sure you have ensured that it runs correctly in a newly started kernel.

Submit a PDF with the following:

  1. 10 newly generated names
  2. 10 newly generated sonnet lines

These can be copied and pasted from your Jupyter notebook or you can provide screenshots showing this output.

EXTRA CREDIT OPTION:

For 2 extra points, provide refinements that could be added to improve the generator for names (1 point) and for sonnet lines (1 point). You DO NOT have to code these -- just provide a description of what you might do in the future for better performance/ouput, considering the output you are getting now as a baseline or starting point.

1B. ChatGPT

Use an account of your own or a friend to have an interaction about the future of AI. There should be at least 4 turns and at most 8 turns in this conversation. Submit a PDF of your interaction. In the first prompt of this conversation, you should introduce yourself by name, and mention that you are beginning a course entitled "Introduction to Artificial Intelligence."

If needed, additional clarifications or corrections will be provided either here or in our ED discussion forum.

Turn in your PDF file to GradeScope under Assignment 1 Part B.

The lead staff members for A1 are Emilia Gan and Kevin Farhat.