Compsci 06/101, Spring 2011 18.1 Cheating at Games l When you play solitaire, does the computer cheat?  What would this mean? l When you play chess, who.

Slides:



Advertisements
Similar presentations
Bananagrams. This game is played in large groups (6-8 people) You will play with a partner, or in a group of three. To begin, you have to take all the.
Advertisements

Business Blockbusters
Chapter 10 Code Optimization. A main goal is to achieve a better performance Front End Code Gen Intermediate Code source Code target Code user Machine-
Top-Down Design CSC 161: The Art of Programming Prof. Henry Kautz 9/16/2009.
I Can Learn From Losing! Introduce the lesson: Ask students what they know about losing – how it feels, when it happened to them, etc. List on whiteboard/chalkboard/easel.
Final Jeopardy Question Type Category 1 Here. Type Category 2 Here 100 Type Category 4 Here Type Category 5 Here Type.
Use logic to teach the computer how to play a game
For the ultimate in entertainment, play with 2 or more people, individually or as a team Players alternate turns Each player picks an “answer” and must.
Week 5 - Friday.  What did we talk about last time?  Repetition  while loops.
CompSci Recursion & Minimax Playing Against the Computer Recursion & the Minimax Algorithm Key to Acing Computer Science If you understand everything,
CS Computer Literacy: Assignment 3 November 10, 2009.
Justus Nyagwencha Game Maker. Getting started -> Resources The icons across the top are very important All the things you add to the game are called “Resources”.
Games Game 1 Each pair picks exactly one whole number The lowest unique positive integer wins Game 2: Nim Example: Player A picks 5, Player B picks 6,
Probability And Expected Value ————————————
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Sample Development: HiLo Game *Chapter 6: Console.
Discrete probability functions (Chapter 17) There are two useful probability functions that have a lot of applications…
HANGMAN Project by Lori Kraus 12/3/03. WWWWe’ve played the game, now let’s see what goes on behind the scenes…. O \ | / | d b …but first, a few new.
The preprocessor and the compilation process COP3275 – PROGRAMMING USING C DIEGO J. RIVERA-GUTIERREZ.
Tanner Chase Helms 12/2/14.  A lot of people don’t know how to play chess  It’s a fun thing to learn.
LISTS. RECAP Major Topics Variables Functions Sensing Messaging OOP.
CSCI 101 Introduction to Software Development and Design.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #005 (April somthin, 2015)
Computer Bugs Original Powerpoint By: Spring LIS4480 Coding Team Jon.
Indian Institute of Technology Hyderabad SOS - The Game A Project by Paritosh J Chandran Prakhar Bharadwaj Ganesh Mahidhar Nagarjun Srinivasan.
Sorting and Modules. Sorting Lists have a sort method >>> L1 = ["this", "is", "a", "list", "of", "words"] >>> print L1 ['this', 'is', 'a', 'list', 'of',
Computer Parts Hardware.
 Make sure you are subscribed to announcements on Moodle.  Activity 4 will be due 48hrs after your lab ends.
Our favourite computer games By Year 10 pupils. Grand theft auto 5 Xbox one Because it is a fun game and I like the characters I just play it on my own.
How to Play Soccer By Aydan Soo-Hoo.
Welcome to... A Game of X’s and O’s Modified from a game Developed by Presentation © All rights Reserved
Conditions. Objectives  Understanding what altering the flow of control does on programs and being able to apply thee to design code  Look at why indentation.
Let’s suppose that you’re hungry. It’s time for lunch or snack. Suggest what you have depending on your cards in hands.
CSE 201 – Elementary Computer Programming 1 Extra Exercises Source: Suggested but not selected midterm questions.
Making Decisions uCode: October Review What are the differences between: o BlueJ o Java Computer objects represent some thing or idea in the real.
Code Design Using Functions CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Compsci 06/101, Fall How to build a program l Create a module  Can be used by other modules via import  Collection of functions, later collection.
Formal Elements - Players. Players Games designed for players. Without players, games have no reason to exist. When designing a game that you need to.
Recap form last time How to do for loops map, filter, reduce Next up: dictionaries.
Daniel Gagnon’s Final Project Number Guessing Game Widget By: Daniel Gagnon.
Formatting of game by Candace R. Black © All rights reserved. Formatting of Game by Candace R. Black © All Rights Reserved. This line of text.
RULES OF THE GAME There are 2 rounds. Round 1 - One person from each team comes to the front of the room. Team 1 will give a one-word clue to their “guesser”
Lecture Notes - Copyright © S. C. Kothari, All rights reserved.1 Efficient Debugging CPRE 556 Lecture 19.
Professor Ira Fay Class 2. Survey feedback Mining Part 1 Meta-Discussion Programming vs. Math Mining Part 2.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Logical Operators, Boolean Variables, Random Numbers This template was just too good to let go in one day!
1 Printing in Python Every program needs to do some output This is usually to the screen (shell window) Later we’ll see graphics windows and external files.
E-Safety Challenge College. Learning Objectives To summarise electronic games which allow access to the Internet and assess the Internet Safety aspects.
Compsci 101.2, Fall Plan for FWON l Review current assignments and APTs  Review Dictionaries and how to use them  Code and APT walk-through.
CompSci 101 Introduction to Computer Science March 31, 2015 Prof. Rodger Thanks to Elizabeth Dowd for giving this lecture Review for exam.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Iteration. Iteration: Review  If you wanted to display all the numbers from 1 to 1000, you wouldn’t want to do this, would you? Start display 1 display.
LISTS. LEARNING OBJECTIVES Create a block that accepts a parameter Create a block that returns a value Create scripts that manipulates lists Incorporate.
Compsci 6/101, Spring Being Clever at Games, aka Cheating l When you play solitaire, does the computer cheat?  What would this mean? l When.
Hangman Code Brittany Moses.
HANGMAN- Software/ Hardware Integration Project Idea was to design a working C++ program to play a Hangman word guessing game Idea was to design a working.
Artificial Intelligence, simulation and modelling.
An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)
Conditionals.
Functions. What is a Function?  We have already used a few functions. Can you give some examples?  Some functions take a comma-separated list of arguments.
A-level Computing Programming challenge 1: Fizzbuzz
Compsci 6/101: I Python Techniques for looping
CompSci 101 Introduction to Computer Science
Engineering Innovation Center
Print slides for students reference
اختر أي شخصية واجعلها تطير!
Bombs & Hearts.
Unit-1 Introduction to Java
Guess the letter!.
PFtTBSB Files and formats: how to read and store data
Iteration – While Loops
Presentation transcript:

Compsci 06/101, Spring Cheating at Games l When you play solitaire, does the computer cheat?  What would this mean? l When you play chess, who wins?  Computer? You? l When you play Poker?  pokerstars.net pokerstars.net  pokerstars.com pokerstars.com l Hangman???

Compsci 06/101, Spring IBM Watson Watson was optimized to tackle a specific challenge: competing against the world's best Jeopardy! contestants http: After Watson Beyond Jeopardy!, the IBM team is working to deploy this technology across industries such as healthcare, finance and customer service.

Compsci 06/101, Spring Computer cheats at Hangman? l This is not allowed: user guesses 't'  Computer says 'no occurrence of t'  Later secret word is 'chocolate' l This is allowed: user guesses 't' knowing that word is six letters with third letter 'r': _ _ r _ _ _  Computer's secret word is 'street'  Computer says 'no occurrence of t' Changes secret word to 'person'  Why is this ok?

Compsci 06/101, Spring How to program cheating game? l Suppose the possible words are those here: [ "OBOE", "NOON", "ODOR", "ROOM", "TRIP", "SOLO", "PICK", "FRAT", "HOOP"] l What happens if player guesses 'O' as the very first guess?  What should computer's secret word be? l ["OBOE", "ODOR"] is an equivalence class l ["NOON", "ROOM", "HOOP"] is too l What about words with no O's?

Compsci 06/101, Spring Aside: Help in debugging programs l Often very useful to print information  Contents of list, set, dictionary, …  After computer winnows possible words?  After computer creates dictionary? l We don't want debugging/print statements in released (final) code if _DEBUG: for key in d: print key,d[key]

Compsci 06/101, Spring How do we use global _DEBUG? l If it's a global variable we don't need to declare it when we use it in a function when …  If we write/change global variable must declare  If we read/access, don't need to declare l Sometimes useful to create print/debug function def debug(info): if _DEBUG: print info debug("%s has len %d" % (key, d[key]) )