2 Pages

Lab1

Course: CSE 511, Spring 2009
School: Washington University...
Rating:
 
 
 
 
 

Word Count: 468

Document Preview

511A: CSE Introduction to Artificial Intelligence Lab 1 Due: October 14 1. In this lab you will write a computer program to play a game, dots and boxes. (http://en.wikipedia.org/wiki/Dots_and_boxes) Starting with an empty grid of dots, players take turns, adding a single horizontal or vertical line between two unjoined adjacent dots. A player who completes the fourth side of a box earns one point and takes...

Register Now

Unformatted Document Excerpt

Coursehero >> Missouri >> Washington University in St. Louis >> CSE 511

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
511A: CSE Introduction to Artificial Intelligence Lab 1 Due: October 14 1. In this lab you will write a computer program to play a game, dots and boxes. (http://en.wikipedia.org/wiki/Dots_and_boxes) Starting with an empty grid of dots, players take turns, adding a single horizontal or vertical line between two unjoined adjacent dots. A player who completes the fourth side of a box earns one point and takes another turn. (The points are typically recorded by placing in the box an identifying mark of the player, such as an initial). The game ends when no more lines can be placed. The winner of the game is the player with the most points. 2. You should implement the minimax search algorithm with alphabeta pruning, discussed in Chapter 6. You may learn and use the code at the AIMA website. (http://code.google.com/p/aimajava/). You may not use any other existing implementation of minimax or game engine. Since the search tree can be very deep, you should implement the cutoff test strategy in Section 6.4. You need to design a heuristic evaluation function for a given configuration. (Thats the key for your computer players strength). 3. Try different cut-off depths and set a depth so that each move takes roughly less than five seconds on your computer. 4. Your program should have an interface for a human player to play against the computer. graphical A interface would be nice but not required. You should at least have a simple text interface that displays the current configuration and takes input from the user to specify the next line. The size of the board should be a parameter in your program. For example, the user can specify the size as 2 X 2, 3 X 3, etc. To simplify your programming, you can assume the maximum size is 6 X 6. 5. 6. Submissions: a. Print out parts of your source code for minimax search, alpha-beta pruning, and heuristic evaluation function. Print out a screenshot of a complete game playing session between a human player and computer on a 3X3 board. For each computer move, print out the Minimax-Value of the current configuration. Run computer vs. computer for increasing board sizes 2X2, 3X3, 4X4, , until the memory runs out or the running time is too longer (e.g. more than an hour) on your computer. Give a table summarizing the results. For each board size, list: the score of player 1 (who moves first), the score of player 2, the depth of the search tree (with an empty board as the root), and the number of nodes pruned by alpha-beta pruning. b. c. 7. We will have a dots and boxes tournament during class on Oct 19. Your program vs. others. Bring your laptop or the executable of your program in a flash drive. Winners get extra points for this lab!
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Washington University in St. Louis - CSE - 511
So what is AI?What is AI?Views of AI fall into four categories: Thinking humanly Thinking rationally Acting humanly Acting rationally The textbook advocates "acting rationally" State of the art: Game playingState of the art: Robots http:/robots.stanf
Washington University in St. Louis - CSE - 511
Reading assignment Chapters 1, 2 Sections 3.1 and 3.2What is artificial intelligence Act rationally Integrate sub-areas in AI into intelligent agents A full breath of potential applications Play games Control space-rovers Cure cancer Trade stocks Figh
Washington University in St. Louis - CSE - 511
TouringproblemsStartfromArad,visiteachcityatleastonce.Whatisthestatespaceformulation?StartfromArad,visiteachcityexactlyonce.Whatisthestatespaceformulation?Twotechniquesformodelingconstraints Invalidatestates Preconditionactions1Uninformedsearchst
Washington University in St. Louis - CSE - 511
Reading Material Sections 3.3 3.5 Optimal Rectangle Packing: New Results By R. Korf (optional) Optimal Rectangle Packing: A Meta-CSP Approach (optional) Sections 4.1 4.2Best-first search Idea: use an evaluation function f(n) for each node estimate of
Washington University in St. Louis - CSE - 511
Logical AgentsChapter 7Knowledge bases Knowledge base (KB): set of sentences in a formallanguage Inference: deriving new sentences from the KB. E.g.: A>5, B>A, B>5 Two blind persons, each bought 2 pairs of black socks and 2 pairs of white socks. Unf
Washington University in St. Louis - CSE - 511
Limitation of propositional logic Propositional logic has very limited expressive power (unlike natural language) E.g., cannot say "pits cause breezes in adjacent squares except by writing one sentence for each squareFirst-order logic Whereas proposi
Washington University in St. Louis - CSE - 511
UncertaintyLet action At = leave for airport t minutes before flight Will At get me there on time? Problems:1. 2. 3. 4. partial observability (road state, other drivers' plans, etc.) noisy sensors (traffic reports) uncertainty in action outcomes (flat t
Washington University in St. Louis - CSE - 511
Bayesian networksChapter 14 Section 1 2Bayesian networks A simple, graphical notation for conditional independence assertions and hence for compact specification of full joint distributions Syntax: a set of nodes, one per variable a directed, acyclic
Washington University in St. Louis - CSE - 511
Planning Chapter 11 Yet another popular formulation for AI Logic-based language One of the most structured formulations Can be translate into less structured formulations such as state-space, CSP, SAT, etc.What is Planning Generate sequences of actio
Washington University in St. Louis - CSE - 422
CSE 422S (Fall 2009)Operating Systems OrganizationHomework 1Reading: Tanenbaum, Chapter 1 Due: Sep. 9, 2009The homework is not typical of other CSE 422S homeworks in that is almost all programming. The problems are primarily my reaction to the results
Washington University in St. Louis - CSE - 422
HOMEWORK 1 SOLUTION-Sep. 2, 2008 (Version 1)Problem 1 (0 Points)-See the course Web link to assess.c.Problem 2 (0 Points)-No partial solution.Problem 3 (0 Points)-See course Web page.Problem 4 (6 Points)-(TO COME)
Washington University in St. Louis - CSE - 422
CSE 422S (Fall 2009)Operating Systems OrganizationHomework 2Reading: Textbook, Section 2.1, Sections 10.1-10.3 Due: Sep. 16, 2009Preview: Problems 5 and 6 examine the eects of temporal locality on cache memory performance. Problem 5 should help you un
Washington University in St. Louis - CSE - 422
CSE 422S (Fall 2009)Operating Systems OrganizationHomework 3Reading: See Problem 1 Due: Mon, Sep. 28, 2009Preview: Problem 6 asks you to read an article on system calls. This reading should help you better understand how system calls are implemented f
Washington University in St. Louis - CSE - 422
CSE 422S (Fall 2009)Operating Systems OrganizationHomework 4Reading: Gnu Libc Manual; Tanenbaum, Sections 2.3.1-2.3.3 Due: Mon, Oct. 5, 2009Preview: Working on both Problems 2 and 3 should increase your understanding of pipelines. In Problem 2, you ar
Washington University in St. Louis - CSE - 422
CSE 422S (Fall 2009)Operating Systems OrganizationHomework 5Reading: Tannenbaum, Sections 2.3, 2.5 Due: Wed, Nov. 4, 2009Problem 1 (2 Points) Consider the following parallel program: int int void X = 0; / Global (shared) want[10] = cfw_0, . , 0; / Glo
Washington University in St. Louis - CSE - 422
HOMEWORK 5 SOLUTION-Oct 30, 2008 (Version 1)Total Points = 14 = 2 + 6 + 6 Problem 1 (2 Points)-(TO COME)Problem 2 (0 Points)-a) The test 'turn = other' places a FIFO ordering on entry into the critical section. Without loss in generality, sup
Washington University in St. Louis - CSE - 422
Computer Architecture (CSE 422S)Dante Cannarozzi Washington University in St. Louisdjc2@cse.wustl.edu www.cse.wustl.edu/~djc2Assessment50 4540 35 30 2520 153 points* 2 points 1 point 0 points10 5 02 -Ken Wong, Jan 2008Topics Instruction executi
Washington University in St. Louis - CSE - 422
Deadlock (CSE 422S)Washington Universitydjc2@cse.wustl.edu www.cse.wustl.edu/~djc2Dante CannarozziDeadlock ExampleFIFO (Named Pipe) Communication A named pipe (FIFO) is a special file that is similar to a pipe except that it is accessed as part of t
Washington University in St. Louis - CSE - 422
Introduction (CSE 422S)Dante Cannarozzi Washington University in St. Louisdjc2@cse.wustl.edu cse.wustl.edu/~djc2Who Am I? Daugherty Business Solutions Software Consultant .NET Windows Mobile Development Washington University Alumni2 -Ken Wong, Aug 20
Washington University in St. Louis - CSE - 422
Unix Pipes (CSE 422S)Dante Cannarozzi Washington Universitydjc2@cse.wustl.edu www.cse.wustl.edu/~djc2Topics Interprocess Communication (IPC) with named and unnamed pipes Unbuffered I/O system calls (open, read, write, close) unlink system call pipe(
Washington University in St. Louis - CSE - 422
Classic Processes (CSE 422S)Dante Cannarozzi Washington Universitydjc2@cse.wustl.edu www.cse.wustl.edu/~djc2fork, exec and the shell (1) Example: Interactive Commands> fib 10 > fib10.out > fib 2000 > fib2000.out & Your interactive shell (tcsh, bash)
Washington University in St. Louis - CSE - 422
Fun With Shells (CSE 422S)Washington Universitydjc2@cse.wustl.edu www.cse.wustl.edu/~djc2Dante CannarozziCommon Shellssh (Bourne Shell, Stephen Bourne, 1977) Default shell for Unix Version 7 Always intended to be a scripting language scripts can be
Washington University in St. Louis - CSE - 422
Unix Signals (CSE 422S)Dante CannarozziWashington Universitydjc2@cse.wustl.edu www.cse.wustl.edu/~djc2The Signal ConceptGenerating Signals Command Line:kill 9 8371Unconditionally kill process 8371 Equivalent to kill -KILL 8371 (send SIGKILL to pro
Washington University in St. Louis - CSE - 422
Synchronization (CSE 422S)Dante CannarozziWashington Universitydjc2@cse.wustl.edu www.cse.wustl.edu/~djc2The Shared Data Problem (1)Consider the following shared memory code:CPU 0 x = x + 1; Shared (Global) int x = 1; CPU 1 x = x + 1;Machine Code h
Washington University in St. Louis - CSE - 422
Classic Synchronization Problems (CSE 422S)Washington Universitydjc2@wustl.edu www.cse.wustl.edu/~djc2Dante CannarozziProducer-Consumer Problem (1)0 nxtOut Consumer.N-1 nxtIn ProducerShared Dataint buffer[N]; / N integer buffers int nxtIn = 0; /
Washington University in St. Louis - CSE - 422
Threads (CSE 422S)Dante Cannarozzi Washington Universitydjc2@cse.wustl.edu www.cse.wustl.edu/~djc2A Modern Process (1) Separate idea of execution from resource grouping Thread A unit of local dispatching (scheduling) and haspriority Has an execution
Washington University in St. Louis - CSE - 422
Using an Operating System (CSE 422S)Dante Cannarozzi Washington Universitydjc2@cse.wustl.edu www.cse.wustl.edu/~djc2Users View of an OS An OS is a collection of system programsAllows user to build, run and debug programs (tools) Provides the user wit
UC Davis - POL - 140A
LSU - BIOL - 1202
Clicker: go 41 go Chapter 22 Principles of EvolutionGoals for Lecture 1 Learn historical context for theory of natural selection Understand how Darwin developed the theory, and his observations and predictions Understand how artificial selection, biogeo
LSU - BIOL - 1202
0.1. 2. 3.Goals for Chapter 24, 25.5,6 Understand differences between 0. biological and phylogenetic species concept 1. micro and macro-evolution 2. allopatric and sympatric speciation Know examples of each type of isolating mechanism (both pre- and pos
LSU - BIOL - 1202
Goals for Chapter 28 o Understand how endosymbiosis gave rise to mitochondria and chloroplasts and eukaryotes o Know a medically or ecologically important organism for each group discussed in lecture o Know a homology for each group o Be responsible for
LSU - BIOL - 1202
Goals for Chapters 29, 30 - Know the major advances of true plants over green algae, and what changes occurred with a terrestrial existence - Understand the major differences in the life cycles of mosses, ferns and seed plants - Know a representative of e
LSU - BIOL - 1202
-Plant Structure and Growth Chapter 35 Know basic anatomy of shoot, root, and tissues Know anatomy of xylem, phloem and tissue types Understand basics of plant developmentFig. 35.20. 1. Fibrous root in monocots vs. _taproot_in dicots 2. Root _hairs_ i
LSU - BIOL - 1202
Chapter 31 Fungi Understand structure and nutrition of fungi Know a homology and an example of each of the five major groups (phyla) of fungi Know what molds, yeast and lichens are and what they do Know at least two examples of both beneficial and deleter
LSU - BIOL - 1202
1Biology 1202 Review Questions for Second Exam Chapter 28: serial endosymbiosis, endoplasmic reticulum, symbiont, paramylon, contractile and food vacuoles, plastids, phytoplankton, sporozoites, micro vs. macronucleus, conjugation, pseudopodia, phagocytosi
LSU - BIOL - 1202
Chapter28ProtistsareEukaryotes 28.1Mosteukaryotesaresinglecelledorganisms Mostprotestareunicellular A.Structuralandfunctionaldiversityinprotists 1.protistshavemorestructuralandfunctionaldiversitythananyothergroupof eukaryotes 2.mostareunicellular 3.single
LSU - BIOL - 1202
Chapter29PlantDiversityI:howplantscolonizedland 29.1Landplantsevolvedfromgreenalgae charophytesgreenalgae(closestprotistrelativetolandplants) 1.MorphologicalandMolecularevidencePlants 1. Multicellular 2. Eukaryotic 3. Photosyntheticautotrops 1. Cellulose
LSU - BIOL - 1202
Exam2ReviewEuglena complexity 28.3(pump water out)(photosynthesis)(food storage)Contractilevacuolepumps waterout Foodvacuoledigestsbacteria trappedbyciliaandmovedto mouthMicronuclei transferred(sex)Cellsreproducelater Sexnotassociatedwith bymitosis
LSU - BIOL - 1202
Ch. 36 Transport in Plants Understand how proton pumps and solute co-transport are involved in moving ions and solutes across plant cell membrane Understand how solute concentration and back pressure determine water potential Understand the basic mechan
LSU - BIOL - 1202
Chapter 33 Understand (from ch. 32) radial vs. bilateral symmetry (32.7), acoelomate vs. pseudocoelomate vs. coelomate (32.8), protostome vs. deuterostome (32.8), prtostome v.s. deuterostome (32.9) and what a lophophore is Understand how sponges feed a
LSU - BIOL - 1202
0. 1. 2. 3. 4.Chapter 33 and 34 Know the major homologies of annelids and differences among classes Know the major advances of arthropods and differences among subphyla Know major homologies of echinoderms and differences among classes Understand differe
LSU - BIOL - 1202
Chapter 41 - Digestion and Nutrition Understand what essential nutrients are Know what occurs in each part of the human digestive system Know what enzymes digest proteins, fats and carbohydrates, and where they do it Know how and where nutrients and water
Berkeley - ECON - 181
Name: _(Last name, first name)SID: _UGBA 118 International Trade Professor Steven WoodFall 2008Exam #1 ANSWERSPlease sign the following oath:The answers on this test are entirely my own work. I neither gave nor received any aid while taking this te
Berkeley - ECON - 181
Name: _(Last name, first name)SID: _UGBA 118 International Trade Professor Steven WoodFall 2007Exam #1 ANSWERSPlease sign the following oath:The answers on this test are entirely my own work. I neither gave nor received any aid while taking this te
Berkeley - ECON - 181
Name: _(Last name, first name)SID: _Econ 181 International Trade Professor Steven WoodSpring 2009Exam #1 ANSWERSPlease sign the following oath:The answers on this test are entirely my own work. I neither gave nor received any aid while taking this
Berkeley - ECON - 181
Name: _(Last name, first name)SID: _Economics C181/Environmental Economics C181 International Trade Professor Steven WoodSpring 2009Exam #2 ANSWERSPlease sign the following oath:The answers on this test are entirely my own work. I neither gave nor
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #1b (Due Tuesday, February 10, 2009)1. Article AnalysisThe Gravity Model: Read this article and answer the following questions. Steve Lohr,"Outsourcing Is Climbing Skills Ladder", The New York Times,
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #2b (Due Tuesday, February 24, 2009)1. Article AnalysisThe Heckscher-Ohlin Model: Read this article and answer the following questions. TylerCowen, Why is Income Inequality in America so Pronounced?
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #3b (Due Thursday, March 5, 2009)1. Article AnalysisThe Standard Trade Model: Read this article and answer the following questions. DavidBarboza, China Says Its Economy Grew by 10.7% in 2006, With Li
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #4b (Due Tuesday, April 7, 2009)1. Article AnalysisIntra-industry Trade: Read this article and answer the following questions. SabraChartrand, Stepping Up the Pressure Against Piracy in China. The Ne
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #5b (Due Tuesday, April 21, 2009)1. Article AnalysisTariffs. Read this article and answer the following questions. Elizabeth Becker,"Textile Quotas to End, Punishing Carolina Towns". The New York Tim
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #6b (Due Tuesday, May 5, 2009)1. Article AnalysisImport-Substituting/Export-Oriented Industrialization. Read this article and answer thefollowing questions. Stephen Kotkin, In Africa, One Step Forwar
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #1b ANSWERS (Due Tuesday, February 10, 2009)1.Article AnalysisThe Gravity Model: Read this article and answer the following questions. Steve Lohr, "Outsourcing Is Climbing Skills Ladder", The New Yor
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #2b ANSWERS (Due Tuesday, February 24, 2009)1.Article AnalysisThe Heckscher-Ohlin Model: Read this article and answer the following questions. Tyler Cowen, Why is Income Inequality in America so Pron
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #3b ANSWERS (Due Thursday, March 5, 2009)1.Article AnalysisThe Standard Trade Model: Read this article and answer the following questions. David Barboza, China Says Its Economy Grew by 10.7% in 2006,
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #4b (Due Tuesday, April 7, 2009)1.Article AnalysisIntra-industry Trade: Read this article and answer the following questions. Sabra Chartrand, Stepping Up the Pressure Against Piracy in China. The Ne
Berkeley - ECON - 181
Econ 181: International TradeSpring 2009 Problem Set #5b ANSWERS (Due Tuesday, April 21, 2009)1.Article AnalysisTariffs. Read this article and answer the following questions. Elizabeth Becker, "Textile Quotas to End, Punishing Carolina Towns". The New
Berkeley - ECON - 181
Set up solver and solve for cost minimization given the production function w 20 q = 10L^.5*K^.5 r 80 Output exp w 0.5 exp r 0.5 A B D 1 Labor (L) Capital (K) Desired Output 2 100100E w 20F r 80C Production Function 0.00G Cost 0.00Labor (L)Capital
Berkeley - ECON - 181
Berkeley - ECON - 181
Econ 100A Non-Comprehensive Review of Market Structure Note the caveat utilitor .December 12, 2008 Michael Schihl1Prot Maximizationi (qi ) = = T Ri (qi ) T Ci (qi ) p(Qi , qi )qi T Ci (qi ) (1) (2)All rms, by assumption, maximize prots. One can expre
Berkeley - ECON - 181
Econ 100A Non-Comprehensive Review of Competition Note the caveat utilitor .December 10, 2008 Michael Schihl1Characteristics of a Perfectly Competitive Market1. Price taking 2. Product homogeneity 3. Free entry and exitAccording to the textbook, the