Part of a state space for the Rush Hour game
Some examples digits from the MNIST dataset
A white collar crime risk app, meant to make us reflect on how AI can be used and abused for social issues and who it normally benefits and harms.
AI playing Super Mario World with Deep Reinforcement Learning
Course Evolving: Site Last Updated 3/11/2022
Table Of Contents
Class Times / Locations
- Monday/Wednesday/Friday, 2:30-3:20PM in Pfahler Hall Room 107
Student Office Hours
Math 111 or equivalent and CS 274 or CS 275, or permission of instructor
I grew up right around the corner in the Montgomery County and attended Upper Dublin High school (class of 2007). I then did my undergraduate degree in Electrical Engineering at Princeton University and my master's and Ph.D. degrees in Electrical And Computer Engineering at Duke University (heavily studying math and CS along the way). I finally started my dream job at Ursinus College in Fall of 2019! You can read more about my interests on my professional web site. Looking forward to getting to know everyone as we work through this course together!
This capstone course will give students a broad overview of both AI and machine learning at an undergraduate level, and it will act as a primer for future graduate work or industry work in these areas. This is a daunting task, as we are currently in an "AI summer," where progress is moving extremely rapidly. As such, we will strive to strike a balance between surveying important modern developments, while also developing a strong classical foundation and conceptual framework for modeling and solving problems. We will take tools from algorithms and data structures, statistics, and numerical math to build strategies for knowledge representation, reasoning, planning, state space search, and supervised, unsupservised, and representation learning. Armed with these tools, we will examine applications in game playing, natural language processing, image processing, computer vision, and digital audio. We will be ever mindful of the ethical implications of AI/ML as we build this knowledge, and five classes will be devoted to studying ethical issues, primarily via the text Race After Technology. Finally, the course will culminate in an open ended ethics project in which students do a deep dive into a contemporary ethics issue in artificial intelligence.
- Develop broad knowledge of classical AI and modern machine learning techniques and the foundation to learn any topic in modern AI after the course.
- Learn how to incrementally design, implement, and test engineering pipelines in code.
- Determine the strength and limitations of different algorithms from both and engineering and ethical standpoint.
- Develop critical thinking skills and careful consideration around the hype surrounding AI and the abuse of AI in contemporary society.
- Apply classical and modern algorithms in supervised learning, unsupervised learning, and reinforcement learning.
- Learn basic data wrangling techniques.
- Develop fluency with abstract modeling of problems as state spaces and geometric landscapes.
- Practice patient problem solving by developing comfort with the edit -> compile -> run loop, along with intermediate debugging skills.
This class will address one of the open questions in the Ursinus core quest: How do we live together?
Automated systems are now deployed in every facet of our lives, from entertainment and recommendation systems, to hiring decisions, to healthcare, to transportation, to policing, and beyond. This can lead to a power asymmetry in our contemporary society between those who have CS knowledge and those who don't, as a few elite individuals with specialized knowledge may effectively govern these realms without a mandate. This has lead to widespread harm in systems that are deployed without proper oversight or transparency, particularly because of the scale at which these systems operate.
Though the primary focus of CS 477 is on technical details of the algorithms behind AI systems, students simultaneously study the harm that some of these systems have historically posed, and they develop critical reasoning via a sustained series of readings and discussions throughout the course on AI ethics. In particular, students start by watching The Social Dilemma to get them to reflect on the corrosive effect of recommendation systems they interact with over social networks. Subsequently, students work through the book Race After Technology throughout the semester, which hones in on a variety of systems that lead to a disparity in outcomes for different racial groups (e.g. predictive policing, face recognition, welfare and resource distribution, privacy and surveillance, etc). Beyond that, most programming assignments have graded reflections on the potential harms of that code, and students do a final research paper on an ethics topic of interest to them.
Below is a table summarizing what kinds of communications/activities occur via each technology, and below that there are more details on everything. This is admittedly complex, and it will take some getting used to, but it will be worth it once we get it nailed down.
NOTE: I will repeat the same announcements across e-mail and Discord, so you don't have to check all both for announcements.
|Class web site (You are here!)||
*: For privacy reasons, anything of a personal nature, and particularly things that have to with educational records (e.g. grades), need to be kept within Ursinus sanctioned platforms like Outlook e-mail and Microsoft Teams.
We will be using Canvas, but only to submit assignments and to store all of the grades. I will also keep all of the due dates current on the calendar there, as students have appreciated this common space for all of their classes in the past.
To facilitate informal, class-wide discussions about the class, we will have a Discord channel for the class. My goal is for this to turn into a flourishing area to work through confusion and to share ideas as a group. All questions are welcome! We will also keep the CS 477 Discord channel open during class for polling and for general questions for students who are shy about speaking up verbally in front of their peers.
In addition to the regular channel, we will be holding drop-in student office hours on Tuesdays on the Ursinus ACM Discord channel, since student office hours are joint between my classes. You can find it under the "Chit Chat" Category, as shown below
Please do not send me direct messages or anything of a sensitive nature (e.g. grades) over Discord. Instead, use Microsoft Teams or e-mail for that, since those transactions are locked down better under Ursinus control.
For one on one direct messages with me, and for buddy group coding with screen sharing, we will be using Microsoft Teams, which is linked to your Office suite through Ursinus, so you are automatically enrolled. This is an easy platform for students to initiate video sharing, so I highly recommend it for group work.
There is no official textbook for the technical part of the course. Readings from a variety of sources will be linked on the schedule. Videos that go over the topics will be provided for students who have to miss class.
For the ethics part of the course, we will be using the following book, which we will discuss throughout four class sessions spread out during the semester.
Race After Technology, Ruha Benjamin
|Hard cover ISBN 9781509526390, Paperback ISBN 9781509526406|
An optional but highly recommended reading is the following
Weapons of Math Destruction, Cathy O'Neil
|Hard cover ISBN 9783446256682, Paperback ISBN 9780553418835|
Since the goal is to give you a broad, hands-on overview of artificial intelligence and machine learning, the bulk of the grade in the course will be earned by completing a number of medium scale programming assignments throughout the course. Be sure to start them early, since debug time can often be unpredictable! Please refer to the collaboration and sharing rules for these assignments.
A word on patience and debugging
If you're taking this course, then you've certainly had experience with debugging, but it is a skill you will still need to work on, so you should expect to hit some roadblocks. In fact, it is time consuming and difficult even for very experienced programmers. So do not be hard on yourself if your programs don't work the first time around (they rarely do, even if you've been programming for decades!). But be sure you leave yourself adequate time to work on the assignments, because the amount of time it takes to resolve issues can be unpredictable.
It's easier to learn a difficult subject like AI by going through a number of examples on each topic beyond the examples in the large assignments. Because of this, we will often do small programming exercises and experiments in class related to a topic that we're learning. At times, I may ask you to read over a description of an exercise or to read some notes about a new topic before class so we can go more deeply into the examples. I may also ask you to hand in something small related to the class exercises to make sure you were putting effort in during class. This will all make up a small part of your grade in the class.
Beyond that, we will have 5 classes devoted to ethics discussions. I will ask you to watch a video or to do some readings before class, and to answer a few brief reflection questions to make sure you are prepared to have a meaningful discussion. I will also grade for participation during these classes.
Outlined below is the schedule for the course, including lecture topics and assignment due dates. All assignments are due at 11:59PM on the date specified. The specific dates of different topics are subject to change based on the pace at which we go through the course.
|Lecture||Lectures (click for notes)||Readings/Links||Assignments/Deliverables|
Unit 1: Intro To AI / Classical Search
|1||Mon 8/30/2021||What is AI? |
Python Basics: Variables, Lists, Conditionals, Methods, Loops
|Assignment 0: Python Self Study Module Out|
|Tue 8/31/2021||Assignment 1: Welcome To CS 477 Out|
|2||Wed 9/1/2021||Python Dictionaries, Python Practice||Assignment 0 Parts 1-3 Due before Class|
|3||Fri 9/3/2021||Python Objects, Object References, COVID Simulation, Monte Carlo Techniques||Assignment 0 Parts 4,5 Due before Class|
|4||Mon 9/6/2021||Tree Search, Graph Search: Breadth-First Search (BFS), Depth-First Search (DFS)||Assignment 1 Due|
|Tue 9/7/2021||Assignment 2: The Rush Hour Problem Out|
|5||Wed 9/8/2021||Continue DFS/BFS, Abstract Search Spaces|
|6||Fri 9/10/2021||Ethics: The Social Dilemma|
|7||Mon 9/13/2021||Iterative Deepening, Uniform Cost Search, Continue 8-Puzzle|
|8||Wed 9/15/2021||Greedy Best-First Search, A* Search|
|9||Fri 9/17/2021||A* Heuristics for 8-Puzzle And Rush Hour|
|10||Mon 9/20/2021||HW2 / A* Workshopping||Tree Rotations Demo|
Unit 2: Statistical Modeling
|11||Wed 9/22/2021||Markov Chains||Assignment 2 Due|
|12||Fri 9/24/2021||Markov Chains Continued, Basics of Probability and Conditional Probability||Assignment 3: Markov Chains for Text Processing Out|
|13||Mon 9/27/2021||Ethics: Race After Technology Introductory Chapter|
|14||Wed 9/29/2021||Bayes Rule, Begin Naive Bayes Classification||Probability Module due before class|
|15||Fri 10/1/2021||Naive Bayes Classification And Bag of Words||Assignment 3 Check In|
|16||Mon 10/4/2021||Gaussian Naive Bayes for Continuous Data Distributions||Bayes Module due before class|
|17||Wed 10/6/2021||Hidden Markov Models|
|18||Fri 10/8/2021||The Viterbi Algorithm||Assignment 3 Due
Assignment 4: Bayesian Robot Localization Out
|19||Mon 10/11/2021||Bayes Filtering, Robot Localization Workshopping|
Unit 3: Classical Geometric Machine Learning
|20||Wed 10/13/2021||Euclidean Distances, K-Nearest Neighbor Classification|
|21||Fri 10/15/2021||Dot Products, Projections, Projected Variance, Begin Principal Component Analysis (PCA)||Euclidean Vectors / Data Vectorization Module Due Before Class|
|--||Mon 10/18/2021||Fall Break||No CS 477 Class. Enjoy the break!|
|22||Wed 10/20/2021||Continue PCA, Matrix Multiplication|
|23||Fri 10/22/2021||Nonnegative Matrix Factorization||Matrix Module due before class|
|24||Mon 10/25/2021||Finish NMF, Begin K-Means Clustering||Assignment 4 Due|
|Tue 10/26/2021||Assignment 5a: 3D Shape Clustering Out|
|25||Wed 10/27/2021||Applications of KMeans To Image Quantization / Superpixels|
|26||Fri 10/29/2021||Ethics: Race After Technology: Default Discrimination And Coded Exposure|
|27||Mon 11/1/2021||Visual Bag of Words: A Connection Between K-Means And Naive Bayes|
|28||Wed 11/3/2021||Separating Lines, Decision Boundaries|
|Thu 11/4/2021||Assignment 5b: NMF for Music Component Separation Out|
|29||Fri 11/5/2021||Begin Logistic Regression|
|30||Mon 11/8/2021||Logistic Regression And Gradient Descent|
Unit 4: Deep Learning
|31||Wed 11/10/2021||Convexity And Logistic Loss, Intro To Neural Networks||Assignment 5a Due|
|32||Fri 11/12/2021||Begin Backpropagation||Assignment 5b Due
Assignment 6: Gradient Descent And Logistic Regression Out
|33||Mon 11/15/2021||Continue Backpropagation, Overfitting||Indicate Final Project Choice|
|34||Wed 11/17/2021||Tensorflow.js, Begin Convolutional Neural Networks||Polynomial Regression / Overfitting / Stochastic Gradient Descent Module Due|
|35||Fri 11/19/2021||Ethics: Race After Technology: Coded Exposure And Technological Benevolence|
|36||Mon 11/22/2021||More Convolutional Neural Networks||Assignment 6 Part 1 Due|
|--||Wed 11/24/2021||Thanksgiving||No CS 477 Class. Enjoy the break!|
|--||Fri 11/26/2021||Thanksgiving||No CS 477 Class. Enjoy the break!|
|37||Mon 11/29/2021||Autoencoders||Pre Assignment 7 Due|
|38||Wed 12/1/2021||Generative Adversarial Networks (GANs)||Assignment 6 Part 2 Due|
|Thu 12/2/2021||Assignment 7: (Deep) Neural Networks Out|
|39||Fri 12/3/2021||Recurrent Neural Networks|
Unit 5: Reinforcement Learning
|40||Mon 12/6/2021||The Multi-Armed Bandit|
|41||Wed 12/8/2021||Reinforcement Learning, Bellman Equations||Class Exercise: Cat + Mouse|
|42||Fri 12/10/2021||Finish Race After Technology, AI Ethics And AI Snake Oil|
|Wed 12/15/2021||Assignment 7 Due|
|Fri 12/17/2021||Final Paper Due|
|Sun 12/19/2021||Final Paper Peer Feedback Due|
|Class Engagement, Pre-Class Prep, Ethics Reading||15%|
In the absence of accommodations or communication with me, all assignments are due at 11:59PM EST on the date(s) stated on the schedule. Students can turn in those assignments past the deadlines, and the scores will be adjusted as follows:
- -5% for work submitted between 1 minute - 6 hours late
- -10% for work submitted up to 12 hours late
- -15% for work submitted up to 24 hours late
- -25% for work submitted up to 48 hours late
- -40% for work submitted up to 96 hours late
- -50% for work submitted more than 96 hours late but before solutions are returned
Letter grades will be assigned on the scale below at the end of the course.
Computer science is a field that has historically been and continues to be steeped in inequalities. As we will see, modern AI and machine learning techniques have added fuel to the fire, so there is a special role and responsibility that those who have AI/ML knowledge have to play in being good stewards around both the technology and within work environments.
Within class interactions, my goal is to foster a environment in which students across all axes of diversity feel welcome and valued, both by me and by their peers. Axes of diversity include, but are not limited to, age, background, beliefs, race, ethnicity, gender/gender identity/gender expression (please feel free to tell me in person or over e-mail which pronouns I should use), national origin, religious affiliation, and sexual orientation. Discrimination of any form will not be tolerated.
A slightly more subtle thing that we want to watch out for in class is not to assume anything about others based on implicit biases. I have heard from quieter students at Ursinus from different backgrounds in the past that they sometimes feel their contributions aren't valued from their group members and that they're talked over during collaborations. So please be mindful of this and be sure to curb this behavior in yourself if you notice it...this is something immediate you can to do help stem the leaky pipeline in our field.
.Furthermore, I want all students to feel comfortable expressing their opinions or confusion at any point in the course, as long as they do so respectfully. As I will stress over and over, being confused is an important part of the process of learning computer science. Learning computer science and struggling to grow is not always comfortable, but I want it to feel safe. In other words, I will regularly keep you at the boundary of your comfort zone with challenging, real-world assignments, but I want you to feel comfortable with me and your peers and respected as a learner during the process.
Finally, I am aware that, particularly during the pandemic, there are a variety of factors that may make it difficult to perform at your best level in class. At Ursinus, we are fortunate to have quite a mix of students from different backgrounds, many of whom need to work part time, and an increasing number of whom are commuters and have family obligations. If you find yourself having difficulty performing at the level that you want and/or turning assignments in on time because of any of these issues, please communicate with me, and we can come up with a solution together (I will gently reach out if I notice any slips even if you don't communicate). This is an exciting capstone course, and I want to work to keep your excitement alive, regardless of your personal circumstances. We will get you through the course as long as the lines of communication are open and we work together. You belong in CS!
We will be wading into some difficult issues in our ethics discussions, and race will be explicitly centered in many of them. Things will probably be fine even if we don't have "the talk," but I want to make absolutely certain we're on the same page. In particular, there are three important ground rules we will all need to abide by (myself included)
- Everyone in the class is a unique individual with a unique set of life experiences and views. No person should be made to feel that they are the "representative" or "token" for any societal group, particularly since we are so demographically imbalanced in CS. People should only speak up if they feel comfortable.
- It's important that we all go into this with a good faith attitude. We live in a fractured nation, so let's use this class as a petri dish for developing what productive discussions around contentious social issues might look like. I know for a fact that there are people in this class on opposite sides of the political spectrum from each other, but if we can all agree that we're working on this together and trying to figure it out, we will be OK. Right now, we're just Ursinus people trying to talk through difficult issues.
- Someone will inevitably offend someone else. This happens in the course of human events. In the spirit of #2, what we should do in this instance is to establish a careful protocol to move forward in a productive way. What I'd like to propose is that if someone feels offended by something someone else says, and they are willing to call it out, the offended party immediately says "burn." The person who said something that was perceived as offensive should immediately respond with "aloe." This quick intervention reminds us that we're all actually on the same team, and we want to learn more about where each other is coming from. At that point, the burned person can explain why they feel that way, and the alloe person can listen and clarify in a respectful manner. Often, people have no idea what they said might be offensive, so it's a good time to talk through things carefully and to learn without shaming or ostracizing anyone
Classroom Attendance And Etiquette
Students are expected to attend class in person. We're shooting for engagement over mere attendance; students are expected to be active in class exercises and to be fully invested in the class (i.e. no internet browsing). Students who are unable to attend class for significant reasons (whether isolation or quarantine for students who have received a positive test, those experiencing Covid-related symptoms while awaiting test results, or other issues that make it difficult to attend class) should work pro-actively to make up any class exercises that they missed. To help with this, I will do my best to put up Youtube videos from other instructors on topics that we cover.
Finally, students are expected to follow any college policy requiring mask wearing on campus, in addition to following any guidance faculty provide for their individual classes.Masks should be available in every academic building, if needed.
Maximizing Your Communal Experience
Here are ways students can maximize their experience as a class community, and which could lead to extra credit in certain situations.
- Helping to teach a student a topic during student office hours.
- Certain calls for participation in class
- Particularly helpful or insightful messages on Discord
- Finding mistakes in class notes or on the assigned homework
Discord Communication PolicySince this is a class-wide communication, the following rules apply to online communication
- Students are expected to be respectful and mindful of the classroom environment and inclusivity standards. They are equally applicable to a virtual environment as they are in class.
- Students are not permitted to publicly share direct answers or questions which might completely give away answers to any homework problems. When in doubt, please send me a direct message.
- I will attempt to answer questions real time during my virtual student office hours. Otherwise, I will make every attempt to respond within 24 hours on weekdays. I cannot be expected to respond at all on Saturdays or Sundays or outside of 10AM-8PM on weekdays, so please plan accordingly. (Of course, students can and should still respond to each other outside of these intervals, when appropriate).
The points above are part of a more general term referred to as "netiquette." Please refer to the chart below, provided by Touro College
The collaboration policy for this class walks the line between encouraging openness and collaboration during a challenging learning process, while also making sure that each students is progressing technically at an individual level without relying on 100% on other classmates. Communication between students is allowed (and encouraged!) on most assignments, but it is expected that every student's code or writeups will be completely distinct. Please do not copy code off of the Internet. Please cite any sources in addition to materials linked from the course website that you used to help in crafting your code and completing the assignment.
To encourage collaboration, students will be allowed (not required) to choose one or more "buddies" to work "near" during the programming assignments. Students are still expected to submit their own solutions, but they are allowed to provide substantial help to each other, and even to look at each others' code during the process. Students should indicate their buddies in the README upon assignment submission. Please let me know if you would like a buddy but are having trouble finding one.
Collaboration Scenarios Table
Below is a table spelling out in more detail when and how you are allowed to share code with people (table style cribbed from Princeton CS 126).
|DISCUSS CONCEPTS WITH:||✔||✔||✔||✔||✔|
|ACKNOWLEDGE COLLABORATION WITH:||✔||✔||✔||✔||✔|
|EXPOSE YOUR CODE/SOLUTIONS TO:||✔||✔||✔||✘||✘|
|VIEW THE CODE/SOLUTIONS OF:||✔||*||✘||✘||✘|
|COPY CODE/SOLUTIONS FROM:||✘||*||✘||✘||✘|
Pre-Class Algorithm Design
|DISCUSS CONCEPTS WITH:||N/A||✔||✘||✘||✘|
|ACKNOWLEDGE COLLABORATION WITH:||N/A||✔||✘||✘||✘|
|EXPOSE YOUR CODE/SOLUTIONS TO:||N/A||✔||✘||✘||✘|
|VIEW THE CODE/SOLUTIONS OF:||N/A||*||✘||✘||✘|
|COPY CODE/SOLUTIONS FROM:||N/A||*||✘||✘||✘|
* You may view and copy code from class exercises and class resources without citing them, but you should not copy solutions from previous semesters that the instructor may have provided
NOTE: The terms "exposing" and "viewing" exclude sending or ingesting electronically, which would be considered copying. Exposing and viewing are normally done in the context of in-person working or in the help room. When students work remotely, what this means is that buddies can screen share as they are working through things, but they should not send code directly.
NOTE ALSO: "Other people" includes internet sources.
If the collaboration policy has been violated in any way, regardless of intent, then it may be an academic dishonesty case, and it will be referred to the Associate Dean for Academic Affairs. I am required to make this report in every occurrence, so it is best to speak with me first if there are any questions about the policy or expectations. You should feel free to have these conversations with me anytime prior to making your submission without fear of penalty.
On a more personal note, though a willful violation of academic honesty may seem merely transactional to a student, faculty take violations very personally, as they are disrespectful to the time and effort we put into our courses. I would also like to emphasize that your reputation is much more important than your grades. The recommendations we as faculty write go a long way, and we are much happier to write positive recommendations for students with lower grades who show grit and growth than we are to write recommendations for students with higher grades who have cheated.
In addition to our general awareness diversity, Ursinus College is also committed to providing reasonable accommodations to students with disabilities. Students with a disability should contact the Directory of Disability Services ASAP. Dolly Singley is located in the Center for Academic Support in the lower level of Myrin Library. Please visit this link for more information on the process. I will do my best to accommodate your requests, and they will be kept completely confidential.
One on one tutoring for up to two hours per week is available through the institute for student success. Please click here to fill out a Qualtrics survey if you'd like to take advantage of this.
Mental health care is increasingly recognized as a crucial service for the undergraduate population. Please visit this link for more information about complementary counseling services provided by the college. The Wellness Center has a virtual drop-in crisis hour at 2-3 pm each weekday, which is available for students in crisis who need to be seen immediately by a clinician. If you are still hesitant to go, take me (Professor Tralie) as an example of someone who has benefited greatly from talk therapy and medication in the past. I am happy to discuss this in student office hours in more detail.
Title IX is a federal law, under which it is prohibited to discriminate on the basis of gender. The Title IX Coordinator is available to receive inquiries and to investigate allegations in this regard.
Inclement Weather Policy (aka COVID Policy)
In the event that the College closes due to inclement weather or other circumstances (such as a COVID lockdown), our in-person class sessions, drop-in student office hours, or other meetings will not be held. I will contact you regarding our plan with regard to rescheduling the class or the material, any assignments that are outstanding, and how we can move forward with the material (for example, any readings or remote discussions that we can apply). If necessary, I may schedule online virtual sessions in lieu of class sessions, and will contact you with information about how to participate in those. I will communicate this plan to the department so that it can be posted on my office door if it is feasible to do so. This policy and procedure will also apply in the event that the College remains open but travel conditions are hazardous or not otherwise conducive to holding class as normal. Should another exigent circumstance arise (for example, illness), I will follow this policy and procedure as well.