Presentation is loading. Please wait.

Presentation is loading. Please wait.

Click here for USACO solutions! …just kidding. (You still have until the end of today to take it!)

Similar presentations


Presentation on theme: "Click here for USACO solutions! …just kidding. (You still have until the end of today to take it!)"— Presentation transcript:

1 Click here for USACO solutions! …just kidding. (You still have until the end of today to take it!)

2 Introduction to Artificial Intelligence Branch of computer science Goal of AI – to figure out what to do when you don’t know what to do o “Uncertainty management” o AI program (“intelligent agent”) gets input from environment via “sensors,” affects its environment through “actuators” (output) o Perception action cycle: Loop of sensor input, decisions, actuator output o AI = How to map sensors to actuators

3 Applications of AI Robotics o Often associated with AI o Translating input from sensors into output (motors, speakers, etc.) Games o Playing games (e.g. chess) o Making game actors/characters feel more natural Internet o Web crawlers (search engines), spam filters, recommendations, etc. Finance o Predicts price fluctuation for stocks, bonds, commodities, etc. o Helps make trading decisions Medicine o Suggest diagnoses given list of symptoms o Monitor intensive care patients or long-term medication

4 Machine Translation Utilizes machine learning extensively Translator is fed many, many examples of already- translated text (such as a news article in two languages) o Builds translation model by figuring out which phrases correspond to which o Ex: “My name is” appears in English wherever “Je m’appelle” does in French Google Translate does this for 50+ languages o Constantly improved by user feedback

5 Spam Filtering Also relies on machine learning Analyzes messages for “spam-like” words/phrases o Figures out which words are most indicative of spam (e.g. “Viagra”) based on past messages o Bayesian probability/inference Other known “spam-like” qualities o Known spammer IP o Emailed person before? o Addresses recipient by name?

6 PotW - Cow Vegas In an effort to swindle his cows, Farmer John has devised a (not so) brilliant game to play against Bessie. Bessie, compensating for her bovine intelligence, pays you with milk to write a program that helps play for her. The game begins with n stacks of coins and m i coins in each stack, and Farmer John graciously lets Bessie go first. If each player takes 1 to k coins from one stack on each turn, and the player who takes the last coin out of all stacks wins, determine who will win assuming optimal play. Sample Input: 1 2 (one stack, take up to two) 6 (the stack has one coin) Sample Output: John (either “John” or “Bessie”) For 15 points, solve the problem for n=1 (1 stack of coins). For 15 more points, solve the problem for 1 < n < 1,000,000 All integers in the input are less than 1,000,000 in magnitude.

7 Hints Sample Input #2: Sample Output #2: 3 3 John 3 6 9 Sample Input #3: Sample Output #3: 3 2 Bessie 1 1 1 Try to find a pattern for the basic problem Use Sprague-Grundy impartial game theory for the extension o Sprague-Grundy theory gives each pile of coins a "nimber" not necessarily equal to the number of coins o The nimber of a state is equal to the minimum-exclusion of the nimbers of states reachable from the state o Nimber = zero: losing state, otherwise: winning state o XOR nimbers together to combine multiple states (piles) o Consult Google for details Final solution is actually very simple


Download ppt "Click here for USACO solutions! …just kidding. (You still have until the end of today to take it!)"

Similar presentations


Ads by Google