logging in or signing up code invaders Miguel Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 569 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 06, 2007 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Code Invaders: Code Invaders All your code now belong to us Make your timeWhat’s An AI: What’s An AI Alan Turing (1950) Turing Test Can computer’s think? "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.” - Dijkstra What is an AI?Let’s Play Some Games: Let’s Play Some Games Snakes and Ladders Battleships TicTacToe Checkers Chess GoYour Mission should you choose to accept it: Your Mission should you choose to accept it Develop an AI for a ship Points for collecting energy Points for delivering energy to your home world Points Shooting the Enemy Evaluate current situation Perform an action given that situation The computer does not thinkLet’s Review: Let’s Review What is AI? What is the Turing Test? Does Snakes and Ladders need AI? Does TicTacToe need AI? What are the steps in AI?Setup: Setup Eclipse plugin CSB computers have Code Invaders installed Download Eclipse and plugin www.eclipse.org http://slammer.cs.dal.ca/~cjordan CodeInvaders zip file Unzip into plugin directory Does not work on MacGetting Started: Getting Started Start Eclipse File -> New -> Project Other -> Game Project Select Code Invaders Name your project Select a directory for your workspace U drive, USB stickOk Rookies, Let’s take off: Ok Rookies, Let’s take off This is a fresh install Your ship does nothing Select games.xml Name your ship and organization Add yourself Run Escape quits early Each match runs for a set number of turns 1200Move Your Zig: Move Your Zig Every turn your ship’s move method is called src -> default package -> MySpaceShip.java You can put all your code in move(int) this.setThrust(SpaceShip.MAX_THRUST); Run again double target = this.getHeadingTo(this.getHomePlanet()); this.turnToHeading(target); Run againSome Documentation: Some Documentation Help -> Help Contents -> CodeInvaders -> CodeInvaders Manual Use the Eclipse auto help this. Wait See the info box?Some Ship Functions: Some Ship Functions fire() - fires a shot at current heading pulse() - pulse wave is fired setShieldUp() - rises shield for 30 turns getDistanceTo(IObject) - distance to object setRotationThrust(double) - turning speed beamEnergy() - beam energy to planet beamEnergy(IShip) - energy to ship getMyDrones() - an array of your dronesThe World: The World World.getOtherShips() - array of ships World.getOtherDrones() - array of drones World.getEnergySources() - array of energy source World.getBullets() - array of bullets World.getPulses() - array of pulsesFighting Other Ships: Fighting Other Ships Add other sample ships Run a server Window -> Preferences -> Games -> Start Other people can now submit ships to your server games.xml -> Game Server Server host name = your computer Submit Code Add other people’s ships RunDesigning your AI: Designing your AI Evaluate game conditions Like TicTacToe! if (Chris is awesome) give him good evaluation else if (class boring) beat Chris else if (confused) rise hand if (sleepy) drink coffee Another layer of complexity: Another layer of complexity Droids Same capabilities as your ships Stores less energy Smaller You have 3 of them Counters Declare them in your MySpaceShip class Initialize them in initialize() Use them in move()Someone set us up the bomb: Someone set us up the bomb Term Project Report Explain your strategy Explain different conditions you test for Explain different actions you perform Explain what priorities you have Code Comment each code block if/else while for Any complex chunk of code DemoFor Great Justice: For Great Justice You will fight the Wong-a-tor Victors will get a 5% Bonus Mark You will fight each other Winner has lunch with the Dean You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
code invaders Miguel Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 569 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 06, 2007 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Code Invaders: Code Invaders All your code now belong to us Make your timeWhat’s An AI: What’s An AI Alan Turing (1950) Turing Test Can computer’s think? "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.” - Dijkstra What is an AI?Let’s Play Some Games: Let’s Play Some Games Snakes and Ladders Battleships TicTacToe Checkers Chess GoYour Mission should you choose to accept it: Your Mission should you choose to accept it Develop an AI for a ship Points for collecting energy Points for delivering energy to your home world Points Shooting the Enemy Evaluate current situation Perform an action given that situation The computer does not thinkLet’s Review: Let’s Review What is AI? What is the Turing Test? Does Snakes and Ladders need AI? Does TicTacToe need AI? What are the steps in AI?Setup: Setup Eclipse plugin CSB computers have Code Invaders installed Download Eclipse and plugin www.eclipse.org http://slammer.cs.dal.ca/~cjordan CodeInvaders zip file Unzip into plugin directory Does not work on MacGetting Started: Getting Started Start Eclipse File -> New -> Project Other -> Game Project Select Code Invaders Name your project Select a directory for your workspace U drive, USB stickOk Rookies, Let’s take off: Ok Rookies, Let’s take off This is a fresh install Your ship does nothing Select games.xml Name your ship and organization Add yourself Run Escape quits early Each match runs for a set number of turns 1200Move Your Zig: Move Your Zig Every turn your ship’s move method is called src -> default package -> MySpaceShip.java You can put all your code in move(int) this.setThrust(SpaceShip.MAX_THRUST); Run again double target = this.getHeadingTo(this.getHomePlanet()); this.turnToHeading(target); Run againSome Documentation: Some Documentation Help -> Help Contents -> CodeInvaders -> CodeInvaders Manual Use the Eclipse auto help this. Wait See the info box?Some Ship Functions: Some Ship Functions fire() - fires a shot at current heading pulse() - pulse wave is fired setShieldUp() - rises shield for 30 turns getDistanceTo(IObject) - distance to object setRotationThrust(double) - turning speed beamEnergy() - beam energy to planet beamEnergy(IShip) - energy to ship getMyDrones() - an array of your dronesThe World: The World World.getOtherShips() - array of ships World.getOtherDrones() - array of drones World.getEnergySources() - array of energy source World.getBullets() - array of bullets World.getPulses() - array of pulsesFighting Other Ships: Fighting Other Ships Add other sample ships Run a server Window -> Preferences -> Games -> Start Other people can now submit ships to your server games.xml -> Game Server Server host name = your computer Submit Code Add other people’s ships RunDesigning your AI: Designing your AI Evaluate game conditions Like TicTacToe! if (Chris is awesome) give him good evaluation else if (class boring) beat Chris else if (confused) rise hand if (sleepy) drink coffee Another layer of complexity: Another layer of complexity Droids Same capabilities as your ships Stores less energy Smaller You have 3 of them Counters Declare them in your MySpaceShip class Initialize them in initialize() Use them in move()Someone set us up the bomb: Someone set us up the bomb Term Project Report Explain your strategy Explain different conditions you test for Explain different actions you perform Explain what priorities you have Code Comment each code block if/else while for Any complex chunk of code DemoFor Great Justice: For Great Justice You will fight the Wong-a-tor Victors will get a 5% Bonus Mark You will fight each other Winner has lunch with the Dean