January 6: Introduction: heuristics are not a second best approach to life. When do you need heuristics: incomplete information (biology -- too expensive to do experiments) unknowable information -- (unknown unknowns for spacecraft for markets) too much effort to do the computation -- (people will do anything to avoid mental effort) Themes: make do with what you have reduce problems to their simplest forms and solve those (puzzles) if you can assign probabilities, combine them to achieve conclusions if you can't, use statistics to find probabilities doing the best with the worst case feedback playing against an adversary learning patterns But you can't give up. You try anyway. Use estimates for incomplete information (statistics). MacDonalds. Use adaptability for unknowable information. (nancy leveson, notion of feedback/oscillation/control, feedback puzzles) Use puzzle solving techniques to manage effort. Programming is a tool to help. Hope is not a strategy. Review syllabus. What you will have to do. Chapter presentations, puzzles, python. Students introduce themselves. Puzzles -- require no special background. YOu must make use of tools at hand. Scientific experiments -- fundamentally a creative endeavour to explore the unknown. Theories should not be easily variable. Programming -- a tool you will need. This afternoon, download python and write the first program. Be able to execute this from the command line. Figure out which puzzle you want to be champion of. Sometimes there is a way to find a solution: Consider estimating the number of MacDonalds in the united states. 300 million people in the US. Each MacDo probably handles 100 people an hour, so 1200 people per day. Suppose each person visits once per week, so each one handles roughly 10,000 customers. So, 30,000 MacDos. Actual number is 14,000 http://ezlocal.com/blog/post/10-Largest-Fast-Food-Chains-in-the-US.aspx Now consider building an electric train. What can go wrong. Train falls off of track. Electricity goes out -- what do you do about the brakes. Heuristics are closely related to design. Scottish water funicular. Greaseless ball bearings: [cool but not related] http://www.gizmag.com/greaseless-ball-bearings-coo-space-adb/37689/?utm_source=3DGizmag+Subscribers&utm_campaign=3D8e2bd5147d-UA-2235360-4&utm_medium=3Demail&utm_term=3D0_65b67362bd-8e2bd5147d-89850010 Powers of 10: [cool but not related] https://www.youtube.com/watch?v=0fKBhvDjuy0 From Mike Whittaker: One of my favourites is Ove Arups footbridge at Durham. Pure genius. Instead of having to use formwork over the river, or other methods- he designed each half of the bridge to be built parallel to, and on the banks at either side- then rotated them into position & pinned them together. https://www.flickr.com/photos/iqbalaalam/5201458289/ Happiness as a heuristic: https://www.theatlantic.com/family/archive/2020/04/how-increase-happiness-according-research/609619/ Happiness = genes (40%) + circumstances + habits Habits = faith + family + friends + work Satisfaction = what you have / what you want Ducks as pest control: dead link https://www.greatbigstory.com/stories/the-quack-squad-nature-s-own-pest-controllers?xrs=CNNOUTBRAIN&hpt=ob_blogfooterold *** Learn anything to a good level in 20 hours https://www.youtube.com/watch?v=5MgBikgcWnY *** Feminist interviews men's rights activists https://www.youtube.com/watch?v=3WMuzhQXJoY *** speaking so people listen https://www.ted.com/talks/julian_treasure_how_to_speak_so_that_people_want_to_listen?language=en Success as a heuristics: https://www.cnbc.com/2020/01/13/mistakes-rich-and-successful-people-never-make-according-to-self-made-millionaires.html Spying as a heuristic: https://www.washingtonpost.com/graphics/2020/world/national-security/cia-crypto-encryption-machines-espionage/ Narcism, confidence and bad leaders Competence and confidence are not the same. *** https://www.youtube.com/watch?v=zeAEFEXvcBg Reducing violence as a heuristic using behavioral analysis: https://edition.cnn.com/2022/04/23/opinions/surprising-solution-to-gun-violence-ludwig/index.html file: violenceprevention Project based. That's how you learn. Let me get to know you. From http://cims.nyu.edu/drecco2016/ any game (suggestions on syllabus) French voronoi http://interstices.info/jeu-voronoi and from http://cims.nyu.edu/drecco/ No tipping v2 Sudokill prime squares auction for practice gerrymandering and geowar need work superply and voronoi need work Life lessons: (learning from the navy seals) https://explore.walkerdunlop.com/e/436452/l-436452-2020-10-29-8h1b1v/8h1blv/1137557383?h=AUhroSL8oYktHFq6tOZKyUwDlz2pFpopznwNlVjqQI8 Password: WalkerWebcast Grit and success: https://www.ted.com/talks/angela_lee_duckworth_grit_the_power_of_passion_and_perseverance?utm_source=tedcomshare&utm_medium=email&utm_campaign=tedspread Puzzle of motivation (money not good for complicated tasks): https://www.ted.com/talks/dan_pink_the_puzzle_of_motivation?referrer=playlist-the_most_popular_talks_of_all&language=en Responsibility in life Jordan Peterson *** https://www.youtube.com/watch?v=NX2ep5fCJZ8 [not such a great link] http://www.theatlantic.com/technology/archive/2015/09/you-dont-have-to-be-good-at-math-to-learn-to-code/403342/ Learning heuristics for kids: *** https://www.ted.com/talks/alison_gopnik_what_do_babies_think#t-711192 The course is holistic, asking you to combine intuition with analysis. More than following your gut, though over the course of your career, your gut may get better and better. Coolest heuristic: survive thanks to two dogs and your poop: https://www.ted.com/talks/wade_davis_on_endangered_cultures#t-1305279 18:36 ff. Social knowledge: people learn collectively https://www.youtube.com/watch?v=jobYTQTgeUE Being Original means trying and failure: *** https://www.ted.com/talks/adam_grant_the_surprising_habits_of_original_thinkers?utm_source=tedcomshare&utm_medium=email&utm_campaign=tedspread How dark is space (not really a heuristic): https://www.ted.com/talks/david_deutsch_a_new_way_to_explain_explanation#t-1009626 Hacking as heuristic https://www.youtube.com/watch?v=hqKafI7Amd8 Could be art http://thecreatorsproject.vice.com/blog/eye-candy-projection-mapping-the-sydney-opera-house Not really a heuristic Biomimicry: the ultimate goal (cool heuristics) *** https://www.ted.com/talks/michael_pawlyn_using_nature_s_genius_in_architecture?referrer=playlist-sustainability_by_design#t-597868 Comedy: Start at 0.30 (heuristic of how comedy works) *** https://www.youtube.com/watch?v=twSvd5bQLDw Great psychological experiments (scary): *** https://www.onlinepsychologydegree.info/influential-psychological-experiments/ Natural computing -- design and biological concepts are closely linked more so in the future. Travelling as a heuristic: http://edition.cnn.com/2015/03/16/travel/funnelogy-culinary-travelers-funnelogy/index.html (also copied into foodjourney file) Power as a negative heuristic that can have bad effects: https://www.theatlantic.com/magazine/archive/2017/07/power-causes-brain-damage/528711/ Economics as a heuristic that is trapped by its models [maybe not] http://www.theguardian.com/commentisfree/2015/mar/22/to-move-beyond-boom-and-bust-need-new-theory-capitalism Is the economic system stable or not? Not just academic. My experience: make all risk go external? But that can't happen. Not enough liquidity. given coins, figure out the shortest way to make change Session 2: Later points in part I after p. 57 Persuasion as a heuristic (manipulation, use of scarcity etc). *** https://www.youtube.com/watch?v=cFdCzN7RYbw Photography as persuasion: http://www.nytimes.com/2016/01/17/magazine/against-neutrality.html?partner=socialflow&smid=tw-nytmag&smtyp=cur&_r=0 Management as a heuristic: http://qz.com/493971/inside-chipotles-extremely-intense-39-point-checklist-for-good-management/ Checklists are good. Research as a heuristic: https://medium.com/the-mission/10-000-hours-with-claude-shannon-12-lessons-on-life-and-learning-from-a-genius-e8b9297bee8f Algorithms: ten questions for numbers between 1 and 1000. Evolution and beauty: really great article. http://ic.galegroup.com/ic/ovic/ViewpointsDetailsPage/DocumentToolsPortletWindow?displayGroupName=Viewpoints&u=nysl_ro_bri&p=OVIC&action=2&catId=&documentId=GALE%7CEJ3010659230&zid=8444ff8f06932fd7686ca92853bbf96d Difficult computation: what if person can lie in the 10 questions problem. Factory produces toothpaste. Sometimes the boxes have no toothpaste tube inside. How to make sure that every box that ships has toothpaste in it. Answer: a fan at the end of the assembly line to blow away empty boxes. See amazonwarehouses Military robotics like animals: https://warontherocks.com/2017/07/the-future-of-military-robotics-looks-like-a-nature-documentary/?mc_cid=5e759d9da2&mc_eid=123643dd65 How do you separate a mixed pile of salt, dried peas & sand. Remember? It's kind of instructive because you have to look at the individual properties & the differences, so that: you add water, the peas float, sand sinks, and the salt can be regained through evaporation. *** You have a pile of 20 cards with 10 face up and 10 face down under a blanket. You want to create two piles of 10 cards each with the same number face up in each pile. You divide the pile into two piles of 10 and flip the cards in one of the piles. Let's say the number up originally is U, so 20-U are down. When you divide into two piles, one of them has U1 up and the other U2 up such that U1+U2 = U. Now flip the pile so now 10-U2 are up in the second pile and U2 are down. So first pile: U1 up, 10 - U1 down. second pile: 10-U2 up, U2 down. When does U1 = 10 - U2? When U1 + U2 = 10. Experiment on people: Which city is larger San Antonio or San Diego? 2/3 of Americans get it right. 100% of Germans. Germans had heard of San Diego, not of San Antonio, so assumed San Diego was bigger. Recognition heuristic. cultural shorthand. http://www.businessinsider.com/ford-destroys-cadillacs-rich-guy-ad-2014-3 Ask Turkish people which English soccer teams will win various matches. They choose the teams that they have heard of. Another experiment about the tragedy of the commons: http://www.thelandmagazine.org.uk/articles/short-history-enclosure-britain Psychologist Standing presents 10,000 pictures to subjects, each for 5 seconds. Two days later, shows pairs of pictures, one of which was one of the 10,000 and the other wasn't. Picked the correct one 8,300 out of 10,000 times even though they often protested they were guesing. In advertizing, good idea to associate striking images with a name. e.g. diamond with movie stars or vitamin water with TV actresses. "No such thing as bad publicity" http://cs.nyu.edu/cs/faculty/shasha/papers/RecognitionHeuristic.pdf Biases influencing politics: http://stumblingandmumbling.typepad.com/stumbling_and_mumbling/2016/07/cognitive-biases-ideology-control.html non-monotonic reasoning: 11 is just a number, but could be a date if preceded by Jan. Logic: modus ponens -- aristotle is a man fallacious ones (e.g. about the rose from thinking book) All roses are flowers. Some flowers fade quickly. So: Some roses fade quickly. Jeremie and Marie cake problem. Suppose there are n cakes and c choices. Represent choices in the vertical and cakes horizontally. We try to calculate Marie's payoff. 0 1 2 3 4 5 0 0 0 0 0 0 0 -- Marie gets no payoff if she has no choices 1 0 1/2 3/4 7/8 15/16 ... -- Upper bound: J gives 1/0 choice every time. 2 0 1/2 1 x 3 0 1/2 1 1.5 y 4 0 1/2 1 1.5 2 5 0 1/2 1 1.5 2 2.5 Take the 1 choice, 3 cake example. J offers 7/8; 1/8. If Marie takes 7/8, she gets no more. If she takes 1/8, then J offers 3/4. Now consider the cut x, 1-x where x > 1-x. If Marie takes x, then she gets 3/4+x (go up a diagonal for two cakes 1 choice)) If she takes 1-x, then she gets (go left for 2 choices, 2 cakes) 1 + 1-x. Set these equal to get the x value. 3/4 + x = 1 + 1-x = 2 - x 2x = 1.25 x = 0.625 0.75 + 0.625 = 1.375 = 2 - 0.625 camper's problem Session 3 Peirce's Beanbag and heuristics Language affects the way we think: https://www.ted.com/talks/lera_boroditsky_how_language_shapes_the_way_we_think#t-831334 to earn (English), to win (gagner) in French debt (English, faults (Schulden) in German Some languages are cardinal. I am going northwest. Time moves from east to west. Probability: From individual probabilities to group probabilities. Single die to dice. Know that a family has two kids. Don't know their ages. One kid is playing. That is a girl. What is probability other is a girl. GG BG GB BB boy-boy is impossible. What if you know the oldest is a boy. Monte Hall. Lucky roulette. six barrel gun, two bullets next to each other. After first one, you are still alive. Bait and switch. For that reason the producers set the range of coins to be much larger: 25, 50, 100, 200, 400, 800, 1600, 3200, and 6400. All the door possibiliites -- 25-50, 50-100, and so on up to 3200-6400 -- are equally likely. Let's try 25-50, 50-100. Possibilities: choose 25-50, get 25; for sure, switch choose 25-50, get 50; if switch, lose 25 choose 50-100, get 50; if switch, gain 50 choose 50-100, get 100; don't switch [maybe not] Example from part 2 of Thinking book. 85% of the cabs are green. 15% are blue. Man saw a cab do a hit and run. 80% chance he is right about color. Says that the color is blue. What is chance that color is blue. Line up 100 cabs. He would see 20% of the green cabs as blue, so 1/5 of 85 which is 17. He would see 80% of the 15 as blue, so 12. Chance that the cab is actually blue is 12/(17 + 12). Line up 100 cabs. Could have been any one. Four bags of marbles. Red, Red. Two have one Red and one Blue. Blue, Blue. You pick a marble out of a bag. It is Red. What is the likelihood the other is Red. RR RB BR So, 2/3 chance it will be blue. What if you put it back in the bag and twirl it around. Then you choose a marble out of that same bag. 1/3 chance it is from RR, 1/3 from RB, 1/3 from BR. In the first case, it's sure to be red. In second and third case 1/2 chance to be red. 1/3 + 1/3*1/2 + 1/3 * 1/2. Doctors are told that: i) a certain disease D has a 1% probability ii) a test T will come out positive 90% of the time when the patient has the disease iii) T will come out negative 90% of the time when the patient doesn't have the disease. Patient P, chosen at random, has a positive T result. What is the probability that P has the disease? Line up 100 people. Apparently, docs say 80%. Scary. Ok, there is an obvious Bayesian approach: [See dennisbayesnotes.docx] P(D) = 0.01 P(T|D) = 0.9 P(~T | ~D) = 0.9 P(D|T) = P(D,T) / P(T) = P(T|D)*P(D)/[P(T|D)*P(D) + P(T|~D)*P(~D)] = 0.9*0.01/[0.9*0.01 + 0.1*0.99] Another approach: use the confusion matrix. \ test positive | test negative D 0.9*0.01 | 0.1 * 0.01 ~D 0.1*0.99 | 0.9 * 0.99 fraction of times you are positive and you have the disease vs. total times you test positive (0.9*0.01)/ [ (0.9*0.01) + (0.1*0.99)] 0.009 / [0.009 + 0.099] Present Backus and Rabin Statistics is easy. Something about how computing works -- Backus and Rabin. nature of invention in computer science. http://stattrek.com/online-calculator/binomial.aspx Invention of statistics: http://www.pbs.org/wgbh/nova/physics/prediction-numbers.html Causality, correlation and statistics: https://xkcd.com/552/ A could cause B and C. B and C are correlated but not causal. For example earthquake causes Bob's house to fall down and Alice's too. Doesn't mean Bob's house going down caused Alice's. Polio and soda pop. ./copystatsfiles -- gives files that the students may need Randomized trials: *** http://ed.ted.com/lessons/not-all-scientific-studies-are-created-equal-david-h-schwartz When you have to do Natural Experiments rather than Randomized trials (Jared Diamond): *** https://www.skeptic.com/lectures/natural-experiments-of-history/?mc_cid=4885238c87&mc_eid=65201e9eac Could use machine learning Ben Franklin and mesmerism https://www.bloomberg.com/view/articles/2017-12-22/ben-franklin-s-guide-to-spotting-pseudoscience?mc_cid=8ddfb160aa&mc_eid=123643dd65 Things to look out for when you do your experiments: http://blogs.discovermagazine.com/notrocketscience/2012/03/10/failed-replication-bargh-psychology-study-doyen/#.WkJFH2Q-faZ Sultan's daughter. Need for multiple testing tests: *** http://io9.gizmodo.com/i-fooled-millions-into-thinking-chocolate-helps-weight-1707251800 http://cs.nyu.edu/cs/faculty/shasha/papers/Qvalseasy.ppt Bogus Marijuana study: https://liorpachter.wordpress.com/2014/04/17/does-researching-casual-marijuana-use-cause-brain-abnormalities/ http://www.evanmiller.org/how-not-to-run-an-ab-test.html big problem of reproducibility http://www.nature.com/news/how-scientists-fool-themselves-and-how-they-can-stop-1.18517 myths that will not die: http://www.nature.com/news/the-science-myths-that-will-not-die-1.19022#/b1 Auction Diana asked me how she would test her code, the best idea is of course running the server yourself to get the full test, and if you want to play with that all you have to do is changing the number of players in server.py and changing the IP to your own IP which is found in command line / terminal writing "ipconfig" and choosing under the WIFI section the one that says IPV4 address. It's really not as hard as you would think. Then you just run the server in one window first, and as many copies in different windows of your bot. But as I have an idea someone might be intimidated by this there's a middle way which I exported a file of the data after I had played a round with 7 bots, this data I then made avilable in what I called test file, so right now that should give you a test for a sample bet. In that file you could also just create your own lists of the ones that are defined in the top, the program will calculate standings, rd, number of players itself. testdata.txt Bot Player Auction.py server.py TestFile.py ======== Chapters from The prism and the pendulum Day 1 assignment: choose a chapter from this. Teams of two will present. Presentations on third day in the afternoon Should be something physical illustraing what is happening. chapter one and two: eratosthenes + dropping the ball chapter four: newton decomposition of light chapter seven: foucault's pendulum chapter eight: millikan chapter nine: rutherford's discovery of the nucleus Runner's up: pp. 206ff. Choose any in there. Milgram's experiments In any field you like. Ballard's fluted test tube Galileo measures speed of light -- lantern on one mountain and lantern on another. I open my lantern and you open yours when you see and I measure the time and the distance/time is speed. Doesn't work. Try a nearer or farther mountain and you get same speed. Just measuring reaction time. Romer -- measuring the speed of light based on how long it takes for light to arrive from a moon of jupiter to earth. Earth has close in orbit. Jupiter has far away orbit. Moon at Jupiter Io goes around Jupiter very regularly. So, map out time that moon goes around Jupiter and see it each time. Say it is one hour (e.g. the moon goes around Jupiter at 12 noon, 1 PM, 2 PM etc. Greenwich Mean Time). As Earth's orbit around the sun is much faster than Jupiter's, the light takes longer and longer as time goes on, so the time goes from say one hour, 1 second past the hour, to 2 seconds past the hour, until when the earth is on the opposite side of the sun from Jupiter the time is 1000 seconds past the hour. So the speed he figured was something like 200 million/1000 seconds or about 200,000 miles per second. Roughly 20 minutes in the youtube http://www.youtube.com/watch?v=3enwR6e9V9A&feature=related How to design an incentive so everyone works: best students get the prize and others get nothing vs. each person has a chance at a scholarship in proportion to this rank. Sudoku: backtracking p. 138 of puzzles for programmers and pros. More probability: Oh, yes, the following should be easy assuming a society where boys and girls are born in roughly even numbers. If you know a family has two kids and you see one playing outside and the kid is a girl, what is the chance that the other is a girl? and the kid is a girl, what is the chance that the other is a girl? identify tallest kid in a group of 100 seniors. kids walk by you. You're it or not. Can get 1/4 chance easily. Thinking computationally: Coins problem as dynamic programming. string matching. Sweet tooth. How big should the sample size be; https://en.wikipedia.org/wiki/Sample_size_determination Freeman Dyson vs. high school dropout Feedback dividends. How do we get to the destination? We aim for right, left, right Right, Left, Right -- no feedback Left, Right, Right Right, Right, Left Without feedback, 0.9 * 0.9 * 0.9 + 2 (0.1 * 0.1 * 0.9) With feedback: 0.9 * 0.9 * 0.9 + 2 (0.1 * 0.9 * 0.9) Feedback dividend puzzle Probability when you an assign probabilities Statistics to infer them. Worst case analysis when you can't do much. Feedback always. Use of feedback in getting yur shower to the right temp. Feedback circuit. Reliable result. Feedback in electronic circuits: amplifier A ranging between 8000 and 12000. Want amplification of 100. Reliable feedback that can take a certain fraction F of the output. So, we have Input ---> (-) ---- A -----*----> ^ | | | | | |----F <------ | If F is 1/100, then we have output = A(input - F*output) output(1 + AF) = A*input Or output = A*input/(1 + AF). Because AF is vastly more than 1, we can approximate this as A*input/AF = input/F = 100*input. Controlling loss: Squash club membership: might get sick riffing on the squash problem: search for something on an east-west line segment go one way, then increase search by factor f the other way. Combines feedback with worst case. Suppose it is d away but you don't know what d is, then how much searching do you have to do. Initial distance 1 east then f west, then f*f east etc. Let's say that f^(k-2) <= d <= f^(k-1) Total distance traveled is 1 + (1 + f) + (f + f^2 ) + (f^2 + f^3 ) So 2 sum(f + f^2 + f^3 + ... + f^(k-1)) If f >= 2 then this is bounded by 2*f^(k) and d is at leat f^(k-2) so a factor of 8. Oracle with bets, lies, and decision trees. Start with $100 and adversary can control the flip only once. Searching: Sudoku and backtracking. (see ~/probcourse.d/sudoku file). A* searching No change for the holidays. sciam.d/book3.d/holiday.62 1. If the three checks are made out in the amounts of $15, $30, $60, then you reduce the maximum change left with Claude to $14 no matter what the price. To see this, note that you can combine checks to sum up to $15, $30, $45, $60, $75, and $105. Because these sums differ by only $15, any amount between $1 and $100 is no more than $14 less than one of these sums. Games Social games (nash equilibrium -- prisoners dilemma and friends) Bob Alice 5/5 8/0 0/8 2/2 Punishment for cheating to drive the equilibrium to upper left. alpha beta pruning for game playing probcourse.d/adversarysearch.pdf The DUellists: Keith Carradine and Harvey Keitel The duellists -- start far apart. Have a certain probability of killing, but then use up bullets. strategic bullying Discussions of the tragedy of the commons and how people can in fact preserve common resources: https://aeon.co/essays/the-tragedy-of-the-commons-is-a-false-and-dangerous-myth?utm_campaign=wp_todays_worldview&utm_medium=email&utm_source=newsletter&wpisrc=nl_todayworld Learning from the past: Intuition: http://www.r2d3.us/visual-intro-to-machine-learning-part-1/ Information theory infogain.ppt dtree.ppt Example: http://cs.nyu.edu/cs/faculty/shasha/papers/scikitexamp.zip basics: clustering regression/support vector machines neural nets tree based approaches Application: http://spectrum.ieee.org/computing/software/the-secret-of-airbnbs-pricing-algorithm electronic circuits -- digital logic DNA computing. === xxx Secrets disposable couriers: secret sharing Clustering -- k-means. ====== ========== Natural Computing Rodney Brooks Glenn Reeves and Adrian Stoica Louis Qualls Loveless Leveson Ned Seeman D E Shaw Scott Aaronson ======== ========== consider the denomination design problem. What do you know right away? Ease of calculation. Minimize coins. More or less likely prices. Show the dynamic programming approach. Given a particular set of denominations, find a good approach. Design of an experiment. Pasteur -- rich liquid gives rise to life spontaneously. Pasteur thinks this cannot be right. Boils a liquid and then keeps it sealed. no life. Ah, but the life force is in the air. Ballard's curved flask. social experiments http://cs.nyu.edu/cs/faculty/shasha/papers/framingtvkahn.pdf http://cs.nyu.edu/cs/faculty/shasha/papers/Experimental_Tests_of_the_Endowment_Effect_and_the.pdf Review chapters of natural computing and puzzles on drecco site and crease book You will be responsible for one part of each. Puzzle book Sweet tooth: cake puzzle Byzantine bettors -- like flaky oracles Information gain -- like the parity puzzle Reach for the sky -- sultan's daughters Pork politics -- formation of coalitions Social games -- nash equilibrium As easy as pie -- drawing cuts (can be improved) Lucky roulette -- gun Feedback dividends -- program this. Value of feedback Dig that -- geometrical No change for the holidays -- optimizing the worst case Order the ages -- elimination game Sudoku Sweet Packs Understanding Dice Bait and Switch Check amounts on p. 205 Goals: teach python Install python as a class. Python graduated examples in the afternoon up through reading files, and dynamic programming. Or if you know how to do it, then you go ahead and try the coin denomination. Keep going up to genetic algorithms. Also need interprocess communication for the project. Start with socket client and socket server. Then evolve to the game you have. What are we going to do? First day -- you haven't done homework. How do I start you off? Hand solution to exact change problem given European denominations. Install python as a class. Python graduated examples in the afternoon up through reading files, and dynamic programming. Or if you know how to do it, then you go ahead and try the coin denomination. Keep going up to genetic algorithms. Also need interprocess communication for the project. Start with socket client and socket server. Then evolve to the game you have. extraterrestrial rover: try to get to a destination in front of which obstacles and bombs keep coming up. The answer module will tell whether there is an obstacle and how much to pay to jump and when to jump. projectserver.py and projectclient.py Galileo measures speed of light -- lantern on one mountain and lantern on another. I open my lantern and you open yours when you see and I measure the time and the distance/time is speed. Doesn't work. Try a nearer or farther mountain and you get same speed. Just measuring reaction time. Romer -- measuring the speed of light based on how long it takes for light to arrive from a moon of jupiter to earth. Earth has close in orbit. Jupiter has far away orbit. Moon at Jupiter Io goes around Jupiter very regularly. So, map out time that moon goes around Jupiter and see it each time. Say it is one hour. As Earth's orbit around the sun is much faster than Jupiter's, the light takes longer and longer as time goes on, so the time goes from say one hour, 1 second past the hour, to 2 seconds past the hour, until when the earth is on the opposite side of the sun from Jupiter the time is 1000 seconds past the hour. So the speed he figured was something like 200 million/1000 seconds or about 200,000 miles per second. Roughly 20 minutes in the youtube http://www.youtube.com/watch?v=3enwR6e9V9A&feature=related How to design an incentive so everyone works: best students get the prize and others get nothing vs. each person has a chance at a scholarship in proportion to this rank. Homework: each of you has the assignment to present one of the experiments of the Crease book. Decide which one you want. Go ahead and study some puzzles on the drecco website. Start with Voronoi game. Look at the game and decide what your strategy is going to be in a 1 vs. 1 game. In a many person game. First two players win. Write down your strategy and send it to me. Incomplete information. to teach heuristics, there has to be a problem that you don't know how to solve. You need to try things, experiment, see what works, try to avoid a local minimum, look ahead. Be ready to accept an adaptive approach. Nancy Leveson -- how to use adaptive feedback? Can you construct a world where this is so. A bowl with a dangerous liquid. Brakes that deploy when the electricity goes out. Elevators -- give assignment to design and then I give further constraints. Elevator can't be overcrowded. Any elevator could stop. Design a safe chemical plant. Design a safe financial system. How would you build in safety? How do I get students who face a problem with a lot of uncertainty in any of their endeavours and yet can do something better than going with their gut? Bush story in Iraq. Blink. Make a quantitative guess at things -- how big is the market, how should you measure stuff. How do you measure success? What if things mess up? What are your safety measures? The Prism and the Pendulum Robert Crease Hall effect -- show that electrons move and not protons. Experiments is this: have a flat plate conductor. Put a current through from top to bottom. Then a magnetic field into the page from the viewer side. If protons move then they move downward and then using the right hand rule, the protons will be pushed towards the right. Therefore there would be a higher voltage on the right side than the left. In fact there is a higher voltage on the left than the right. Suppose electrons were moving upwards. Using the left hand rule, we have the electrons going to the right. This explains the phenomenon correctly. http://io9.com/5855860/the-secret-of-ancient-viking-navigation-was-transparent-crystals You could run some other experiments, e.g. social ones about giving money and trust. Secret santa experiment -- whatever you give, receiver gets three times what you give. Nobody knows anything. Organizations building trust. https://www.ted.com/talks/frances_frei_how_to_build_and_rebuild_trust#t-894343 Yale lecture 15 last ten minutes -- deriving magnetism from static electricity. Assignments: Look at drecco.com and choose a game. superply, voronoi game, no tipping, sudokill. Try to find a winning strategy. Assignments: estimation and then check with google epidemiology puzzle for second part Become an expert at one puzzle and present it. You then organize a competition. People try to beat you. You win one point, but winner among other students wins otherwise. Three things to train you with: think analytically. The puzzles. Project: become an expert at one puzzle and be able to beat everyone else at it. Think experimentally: the great experiments. Project: an experiment either from the book or with peole. http://www.bbc.com/future/story/20150901-is-alcohol-really-bad-for-you If you do a population study and leave in the people who are sick and therefore abstaining, you skew the results. Think adaptively: the uses of evolution for natural computing Final Project: design a computational or other system that uses adaptation to accomplish some goal. Bowl with a marble in it is adaptive, but doesn't really accomplish anything. A circuit that redesigns itself does. Either a human or a computational or a physical setup. Capitalism may be thought of an adaptive system that drives prices down while using people's greed. Design a factory, a government, a large engineering setup, something. think of bhopal: scrubbers, refrigeration, properly trained personnel were all costs. They did not have any of them. So want to look for jumps to situations that make the likelihood of other situations even higher. That is key. Could create a python client and server. Natural Computing With prisms and colored glass, isolate just one color on a white screen. Analyze the relative brightness of colors in different white lights. Maybe we can get magnetically propelled weapons. Prism, Foucault pendulum, wire, voltmeter, permanent magnet, battery, solenoid Even though my course is not for scientists, I'd like them to use some equipment that might be found in a physics lab. I don't necessarily need all of the following, but it would be great if I could have some of it: 1. a few reasonable quality prisms Michael could I add a light intensity detector to the list? 2. a few universal joints (for a Foucault pendulum experiment) 3. a conductive sheet, wire, voltmeter, permanent magnet, battery 4. a solenoid. Do you think this is too much to ask? From shasha@access1.cims.nyu.edu Wed May 9 09:20:49 2012 Dear Colleagues, Besides what Michael already has, if you could order the following, that would be great. http://www.sciencelabsupplies.com/Electromagnetic_Kit.html qty: 1 http://www.sciencelabsupplies.com/Simplest_Motor.html qty: 1 http://www.sciencelabsupplies.com/Prism_Glass_Right_Angle.html qty: 2 http://www.sciencelabsupplies.com/Prism_Glass_Equilateral.html qty: 2 I very much appreciate your doing this. Best, Dennis ======= Philosophy of assignments: First week, reading and presenting. Become a champion at some game on the drecco website. Second week: work on your experiments in the afternoon. In the morning we will discuss puzzles. Every day there will be a python assignment having to do with some puzzle. Learning python or honing your skills. Eventually, you will work with a more experienced programmer. Less experienced programmer will present code. Third week: work on final projects. ======= Puzzles from drecco.com Be a champ at some puzzle or another.