Fall 2018 -- Peter Brooks
The (ever-changing) Syllabus
and readings
Decision Trees |
Here is the data that
can be handled by a decision tree. Try to build a minimal
decision tree to encompass all of the data. Draw it on paper
and bring it to class. Here are some decision trees as trees. Here are some decision tree datasets. |
End of course deadlines: |
What I mean by finding the best move up to ply=n -- the MINI-MAX Method
|
Information Theory |
Here
is a quickie intro to Information Theory basics Here is a document I'm working on that matches my information talks. |
Running the demo versions of the 3 games on your PythonWebServer |
|
Here are the current docs for constructing and running the 3 games. |
|
TicTacToe competitor, due Wed Dec 19, 8:00a | Let's get this done before the holidays. |
Running your competitor in the browser |
|
AI and unemployment: New task: for Tues (12/18) 8:00am |
Create and submit an outline for the video we saw on Wed as well as
the essay below. The outlines should be short restatements of
the arguments presented in the video and in the essay. Submit
to the homework server in .doc, .docx, or google-doc form. 1. "Humans Need Not Apply" video. The Economist (magazine) has an excellent, though long, introduction to technological unemployment issues. I'd like you to read the section on The Impact on Jobs (pp. 5 - 8) by Tues and outline the arguments and be ready to contrast that with the video you saw on Wed. The rest of this long introduction is also very good. I urge, though don't require, you to read the other sections. |
Sick today. | Presuming that you're using CoLab, work on the homework today if you haven't finished. Send me a message if you can't run/test the server (v. 1.2) below at home. Presentation postponed until tomorrow. |
Python web server for your home machine | Download this server (v. 1.2). Instructions. |
Tic-Tac-Toe Homework #1: Thurs night, 11/29 Homework #2, Mon night, 12/3 Homework #3, Tues, 12/11 8am |
Intro to tic-tc-toe computing. AllBoards = {} |
Logic puzzles extra credit | Create a logic puzzle solver to solve the Zebra/Einstein puzzle. Report the number of backtracks (incorrect guesses) that it had to make in the Comments-to-Teacher, and also any comments on the task of writing it. There's a homework slot for this extra credit problem with the arbitrary (and ignorable) due date of 11/27/18 11:59p (you're probably late already). |
Logic puzzles |
|
The AI half-course survey is now available. It's due Sun, 11/18. |
If you haven't received an email invitation to fill it out, here is
the survey:
https://docs.google.com/forms/d/e/1FAIpQLSfoHaBEDZPGJgnFJIuq4UJ4b2x7B1XmO2tWJiQaZCz_eYQEvw/viewform?usp=sf_link Take your time while filling it out. |
Sudoku extra credit assignment, due Sun 11/18, midnight | Here 'tis and it's updated with my correct measure of the number of bad guesses. |
Read Machines That Think, 1/2 of chap. 4 by Tues, for discussion | Read "The Limits of AI" chapter at least up to the section on "Red Flags" (pp. 125 - 153). Note the following ideas: Strong vs. Weak AI, AGI, the "hard" problem, Asimov's Laws of Robotics, the short section on Ethics. |
Sudoku Ex.1, due Mon, 11/12, midnight |
You'll be implementing the simplest Sudoku-solving rule. Here
are the details. Note however, that you'll be adding more
sophisticated and powerful rules to this one later, so keep your
code modular. Submit to the
program-tester. You'll be given 2 seconds of CPU time -- you
should not need that much (my program doesn't spend more than a
half-second on any of the possible sudoku boards that you may be
given). You're allowed to import sys and import copy because the copy library provides a deepcopy method that some of you may want to use. If you want both libraries, you must ask for them in two separate statements, not import sys, copy |
Sudoku - 1 | Here is a sudoku data file (Sudoku-boards.txt), that you'll use for testing your Sudoku programs. |
As I sincerely promised you, I'm absent today. |
Perfect day to work on the word-connection problem with your
partner. I am, much to my students' consternation, enamored of open-ended, creative (read: ill-defined) questions. Idea-connections, especially analogies, are central to my thought processes. Those of you who are willing to read an exceptional (though long) essay on thinking -- in fact, one of the very best essays I've read in the last 20 years -- should read Analogy as the Core of Cognition, by the brilliantly creative Douglas Hofstadter. |
The Word-neighborhood exploration project, due Sun, 11/4 midnight |
- Near the bottom of the
Wordladders Homework, in the Challenge Problems section, I've
included some ideas/questions for further exploration. These
were just a few of the ideas that occurred to me as I was creating
that homework task. - The interconnectness of words is a fascinating area. The word-to-word connection we've been using -- single char replacement -- is just one of many possibilities of character addition, deletion, replacement (and other, less minute connections, like anagrams, or even rhymes, homonyms, synonyms, etc.). - For instance, here are the results of a Washington Post contest. - You and your partner should explore some ideas on word-connection, and come up with interesting results if you can. You can also mention questions that you've explored that failed to blossom after research. - Write a document about the questions and results (Google doc, MSWord, LibreOffice, pdf, txt) and submit it to the homework server. Both partners must submit their own copies. Also, in the Comments-to-Teacher, indicate who your partner is. |
Read part of Chap. 3, by Mon, 10/29 classtime. | Machines That Think, first part of Chap. 3, pp. 85 - 103. |
Wordladders Homework, (due Sat, 10/27, midnight) | |
3 Searches explained! | The Uninformed, Greedy and A* searches (version 1.1 is here) are explained. |
Absent today (Wed. 10/17): |
1)
I have slightly changed the instructions for the Pre-Wordladder
assignment. The change is that the "dictall.txt" file is now
in the same directory as your program, and therefore your open
statement should now be: open("dictall.txt","r"). If you've already submitted your homework, change it and resubmit and retest, please. You can, of course, retrieve your program using the "View Homework" tab. Also, some of you may have failed the program-tester test because I was, at that time, moving the file and if so, simply retest. 2) I have posted the DAILY-Presentation Partner page where you register your partnership. So do so (by Sun night, at the latest. But why not now, that you have a whole period that you can dedicate to this task?) https://docs.google.com/spreadsheets/d/1LmvsRsZt0ULPMEF6aNhlzgLf0qvzQRgpJX2ueM_Jg0w/edit?usp=sharing |
The pre-Wordladder assignment; revised: due Sat. 10/20 midnight | The assignment is here. This will be tested by the program-tester, so submit your file, then go to "View Homework" and test it. |
The dAIly starteth soon | |
What to know for Friday's test | |
Priority queue as-a-heap optional extra credit assignment, due Thurs, 10/4 midnight | Here's the assignment. |
Create a Prioity Queue tester, code and results due Mon, 10/1 midnight | Here are the specs for the priority queue tester. |
Read the following by Tuesday, 10/2. |
|
Testing the Program Tester, due Thurs, 10/4, midnight |
Create the program sumline.py (docs
here) Here are the ProgramTester docs |
Create a priority queue in a Jupyter
notebook. Due Fri 9/28/18, midnight |
|
AlphaZero |
Read the first two pages of the research paper announcing AlphaZero
-- this is the type of publishable paper you'll find in AI research. BTW, for those of you who have Netflix accounts, there is a documentary there called ... "AlphaGo" about .... AlphaGo. |
Create classes in a Jupyter notebook to implement a binary tree for
sorting. Due, Thurs, 9/20 midnight. |
Here is my version of the BinTree class in
Notebook and HTML versions. As a sample, here is the Notebook version of a singly-linked ordered list, as well as the HTML version. Your nodes must have a value instance variable that is comparable with the "<", "<=" and "==", ">=" and ">" operators. Your BinTree class is intended to hold nodes in positive order so that they can be used to produce an ordered list of node.values. The BinTree must support the following methods: __init__(A), where A is a list that might be empty (A is a unordered list of values that are comparable -- there may be duplicates) insert(v) (inserts a value v into the tree) has(v) (returns as Boolean indicating whether v is in the tree) get_ordered_list() (produces an ordered list of the values in the nodes) clear() (removes all nodes in the list) The clear() method is tricky. What you want to accomplish is to set every node's pointers to other nodes to None. If you have just 2 pointers to the left and right (larger and smaller) children of that node, then walk the tree carefully, and set those pointers in every node to None. Once all of the pointers to a block of memory (in this case, a node) are removed, that block of memory becomes inaccessible, and should be collected by the garbage-collector later. |
Python Classes | Here is some quick documentation on classes in Notebook form (so you can play with and modify them) and webpage form. |
PythonReview2.ipynb | Download and try the additional Python review topics. Alternatively, here it is as an HTML page. |
For Mon. 9/17: | Read the Preface and Chapter 1 of Machines That Think, and take note of these terms: |
Homework 1, due Sun, 9/16 midnight | Download the Jupyter notebook from here. Submit the modified notebook(.pynb file) to the homework server, and as a Comment-to-Teacher, print the 4 numbers that you got when working on the last notebook cell, and also write a comment as to what those numbers mean. You might try playing with different values of the m parameter, to see what happens. |
Python 2 vs. 3 | |
Python review |
Here's a Jupyter notebook
(right-click to download). Load it into a working Jupyter
server (at school, or at home, or Google's Colab) and: - read all of my Python review docs (#2 and #3) in the first cell - in your browser, bookmark the PQR reference - I have left a cell below each review topic in the notebook for you to play in. Play in them. |
Richard Gruet's Python page | This is my standard quick-reference for Python. It's the first place I go to for a quick look at the operators and methods of built-in datatypes. I often have this up in a different browser tab with programming. Although it's only really accurate for v. 2.7.x, there is very little difference between this and 3.6.x (and anyway, the 3.6.x+ compiler will warn you if you have sinned). |
First task: fill out your Profile on the Homework server. |
|
Help from Mr. Brooks | Feel free to come and see me during periods 6, 7, or 8 in room 301 (just walk in) or by appointment beforehand just after school also in room 301. |
Sending email to Mr. Brooks: |
Send mail to:
pbrooks@stuy.edu You MUST include your name in the subject line or body of the message, otherwise I won't know who it's from. |
Stuyvesant bell schedule | |
Homework/grade server |