CSC-106: Can Computers Think?

Creative Computing Collage

Course Overview

CSC 106 is an introductory course in computer science, focusing on the theme of artificial intelligence (AI). If you've ever wondered how computers are able to perform "intelligent" tasks, this course will show you how the magic works.

At its core, this course is about how computer scientists think about and solve problems. So if you're thinking about a CS major or minor, this will give you a solid foundation. If you're a neuroscience major, this course will help you see how scientists are using biological and neurological principles to model "behavior" in computers. It's also a foundation for the computational track in neuroscience. And if you're here just because you're curious, well, that's great since AI is cool!

By the end of the course, you should be proficient in the following:

Language & Resources

In class, you are required to use our lab iMacs. However, when working on your projects outside of class, you have a choice. If you'd like to continue using our iMacs, feel free! We have three spaces that you can use:

All of these labs are available to you 24/7 using your ID card, except when classes are being held in them.

Course Text

The practice of computing using Python, William Punch and Richard Enbody, Addison-Wesley, 2010, ISBN: 978-0-13-611067-5

Example Assignment

Boggle

Boggle is a famous party game. Never played it? The rules are here. In this final project, you'll use almost every construct we've learned this term to create a Boggle game that you can play against the computer. You'll implement two modes where you can tell the computer to play either "smart" or "dumb". You'll do this by implementing an intelligent algorithm to make the computer be a smart player.

When the game begins, the human player will be shown a welcome message, given instructions if needed, and then the Boggle board will be displayed. The human player will write down words in a plain text file named 'player.txt', one per line. The computer will find words by searching a dictionary and seeing which words can be found on the Boggle board. For each word found on the board, it will place it into a list. When both the computer and the human have finished writing words, your program will determine who gets points by reading 'player.txt' into a list and then finding the unique words in both the computer's list and the human's list. For each unique word found, that player gets a point. Once scores are updated, a new round with a new Boggle board will begin. Play continues until one player reaches a pre-specified number of points.

Example Lab (In-Class Exercise)

Anagram finder

If you can rearrange the letters of a word to form another word, the two words are anagrams of each other. For example, tear is an anagram of rate. You can do it with phrases too. For example, A stew, Sir? is an anagram of waitress as long as you ignore capitalization, punctuation, and whitespace. In this lab, you'll build an intelligent anagram finder that takes phrases as input, and outputs anagrams of that phrase.

  1. Download two text files from Nexus onto your flash drive. "input.txt" is the input file of phrases. Your program will read each phrase (each line) from the file, and print out the anagrams of that phrase. The second text file is "dict.txt". This is a dictionary that lists words (one per line) in alphabetical order. You will use the dictionary to find the anagrams.
  2. Here's the basic idea of how the anagram finder will work.

    1. Read each input phrase and convert it to lowercase characters.
    2. Use the built-in sorted function to create a list of all the characters in alphabetical order. For example, sorted("tear!") will return the list ['!', 'a', 'e', 'r', 't']. Try it in the Python shell to see what it does.
    3. Remove all non-alphabetic characters from the list created in Step 2. For the example, this results in ['a', 'e', 'r', 't'].
    4. Read each word in the dictionary, which are all lowercase already, and for each one, use the sorted function to make another alphabetic list of characters. Thus the word "rate", when sorted, will also result in ['a', 'e', 'r', 't']. This is explained in Chapter 6.5 of your text as a canonical representation of a word.
    5. If the canonical representation of the input phrase is the same as the canonical representation of a dictionary word, they must be anagrams. Append that dictionary word to an output list. PITFALL ALERT: don't include the original phrase itself in the output list. This might happen, for example, if the original phrase is "rate" and "rate" is also in the dictionary.
    6. Once you have gone through all the dictionary words, your output list will have all the anagrams of the original phrase.

Assignments & Grades

Grade Allocation

Schedule