TESTING AI IN ONE ARTIFICIAL WORLD 1. Dimiter Dobrev

Similar documents
A Definition of Artificial Intelligence

FORMAL DEFINITION OF ARTIFICIAL INTELLIGENCE 1

CPSC 217 Assignment 3 Due Date: Friday March 30, 2018 at 11:59pm

UNIT 13A AI: Games & Search Strategies

For our EC331 project we successfully designed and implemented a PIC based Tic-Tac-Toe game using the PIC16874.

Game Mechanics Minesweeper is a game in which the player must correctly deduce the positions of

2048: An Autonomous Solver

a b c d e f g h 1 a b c d e f g h C A B B A C C X X C C X X C C A B B A C Diagram 1-2 Square names

Intro to Java Programming Project

UNIT 13A AI: Games & Search Strategies. Announcements

Computing optimal strategy for finite two-player games. Simon Taylor

Interactive 1 Player Checkers. Harrison Okun December 9, 2015

For slightly more detailed instructions on how to play, visit:

Comparing Methods for Solving Kuromasu Puzzles

Cracking the Sudoku: A Deterministic Approach

Sudoku Online Qualifiers2017

EXPLORING TIC-TAC-TOE VARIANTS

Unit 12: Artificial Intelligence CS 101, Fall 2018

mywbut.com Two agent games : alpha beta pruning

Tiling Problems. This document supersedes the earlier notes posted about the tiling problem. 1 An Undecidable Problem about Tilings of the Plane

Take one! Rules: Two players take turns taking away 1 chip at a time from a pile of chips. The player who takes the last chip wins.

Using Artificial intelligent to solve the game of 2048

CS151 - Assignment 2 Mancala Due: Tuesday March 5 at the beginning of class

CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5

1 Modified Othello. Assignment 2. Total marks: 100. Out: February 10 Due: March 5 at 14:30

Lecture 33: How can computation Win games against you? Chess: Mechanical Turk

Key stage 2 mathematics tasks for the more able Number slide solutions and what to look for

Real-Time Connect 4 Game Using Artificial Intelligence

Y8 & Y9 Number Starters A Spire Maths Activity

The Mathematics of Playing Tic Tac Toe

Grade 7/8 Math Circles Game Theory October 27/28, 2015

array of square cells as a sum of elements not of the "domino" form as in the Tough Hut problem, but of the form

MAS336 Computational Problem Solving. Problem 3: Eight Queens

RULEBOOK. Nikos Chondropoulos. 2-4 players Duration 30 Ages 10+

Final Project: Reversi

Taffy Tangle. cpsc 231 assignment #5. Due Dates

The IQ of Artificial Intelligence

Comp 3211 Final Project - Poker AI

ADVERSARIAL SEARCH. Chapter 5

AI Approaches to Ultimate Tic-Tac-Toe

1. Introduction. 12 black and white hexominoes (made with 6 adjacent squares):

Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! Due (in dropbox) Tuesday, September 23, 9:34am

Lab 11: GoFirst and Nim 12:00 PM, Nov 19, 2017

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

The 2017 British Informatics Olympiad

Game Theory. Vincent Kubala

CPS331 Lecture: Search in Games last revised 2/16/10

Math 3338: Probability (Fall 2006)

V. Adamchik Data Structures. Game Trees. Lecture 1. Apr. 05, Plan: 1. Introduction. 2. Game of NIM. 3. Minimax

Game-playing AIs: Games and Adversarial Search I AIMA

Obliged Sums of Games

Foundations of AI. 5. Board Games. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard and Luc De Raedt SA-1

Game Theory. Vincent Kubala

Mathematics of Magic Squares and Sudoku

Adversary Search. Ref: Chapter 5

This game can be played in a 3x3 grid (shown in the figure 2.1).The game can be played by two players. There are two options for players:

Welcome to the Sudoku and Kakuro Help File.

General Information Theory

G51PGP: Software Paradigms. Object Oriented Coursework 4

Grade 6 Math Circles Combinatorial Games November 3/4, 2015

Introduction to Spring 2009 Artificial Intelligence Final Exam

Here is Part Seven of your 11 part course "Openings and End Game Strategies."

Working with Formulas and Functions

Materials: Game board, dice (preferable one 10 sided die), 2 sets of colored game board markers.

University of Amsterdam. Encyclopedia of AI project. Tic-Tac-Toe. Authors: Andreas van Cranenburgh Ricus Smid. Supervisor: Maarten van Someren

Project Connect Four (Version 1.1)

Fraction Race. Skills: Fractions to sixths (proper fractions) [Can be adapted for improper fractions]

CS360: AI & Robotics. TTh 9:25 am - 10:40 am. Shereen Khoja 8/29/03 CS360 AI & Robotics 1

MONTE-CARLO TWIXT. Janik Steinhauer. Master Thesis 10-08

CMPUT 657: Heuristic Search

Botzone: A Game Playing System for Artificial Intelligence Education

CSC 110 Lab 4 Algorithms using Functions. Names:

Project 2: Searching and Learning in Pac-Man

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Adversarial Search (Game Playing)

CPSC 217 Assignment 3

Techniques for Generating Sudoku Instances

Eleventh Annual Ohio Wesleyan University Programming Contest April 1, 2017 Rules: 1. There are six questions to be completed in four hours. 2.

Project 1: Game of Bricks

Learning serious knowledge while "playing"with robots

CS221 Final Project Report Learn to Play Texas hold em

The Three Laws of Artificial Intelligence

2 Textual Input Language. 1.1 Notation. Project #2 2

Narrow misère Dots-and-Boxes

Game Tree Search. CSC384: Introduction to Artificial Intelligence. Generalizing Search Problem. General Games. What makes something a game?

Foundations of AI. 6. Adversarial Search. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard & Bernhard Nebel

Conversion Masters in IT (MIT) AI as Representation and Search. (Representation and Search Strategies) Lecture 002. Sandro Spina

CS 380: ARTIFICIAL INTELLIGENCE ADVERSARIAL SEARCH. Santiago Ontañón

COMP3211 Project. Artificial Intelligence for Tron game. Group 7. Chiu Ka Wa ( ) Chun Wai Wong ( ) Ku Chun Kit ( )

Software user guide. Contents. Introduction. The software. Counter 1. Play Train 4. Minimax 6

A Tic Tac Toe Learning Machine Involving the Automatic Generation and Application of Heuristics

How hard are computer games? Graham Cormode, DIMACS

NumberSense Companion Workbook Grade 4

Ian Stewart. 8 Whitefield Close Westwood Heath Coventry CV4 8GY UK

Blackjack for Dummies CSE 212 Final Project James Fitzgerald and Eleazar Fernando

Five-In-Row with Local Evaluation and Beam Search

Assignment 6 Play A Game: Minesweeper or Battleship!!! Due: Sunday, December 3rd, :59pm

A Novel Approach to Solving N-Queens Problem

Second Annual University of Oregon Programming Contest, 1998

Introduction to Auction Theory: Or How it Sometimes

Transcription:

International Journal "Information Theories & Applications" Sample Sheet 1 TESTING AI IN ONE ARTIFICIAL WORLD 1 Dimiter Dobrev Abstract: In order to build AI we have to create a program which copes well in an arbitrary world. In this paper we will restrict our attention on one concrete world, which represents the game Tick-Tack-Toe. This world is a very simple one but it is sufficiently complicated for our task because most people cannot manage with it. The main difficulty in this world is that the player cannot see the entire internal state of the world so he has to build a model in order to understand the world. Keywords: AI Definition, Artificial Intelligence, Artificial World, Machine Learning. The world of the Tick-Tack-Toe game In this paper we will observe a concrete artificial world. You can find this world and test it in the examples of the compiler Strawberry Prolog [1]. You have to start the example program World 2.spj. After that you will see one panel with five lamps, three checkboxes and one button. You can observe this program as a test for intelligence. Really, it is made to distinguish AI but you can use it also to test a human being for its level of intelligence. Here are the rules of the test. You are a step device which lives in an artificial world. To make a step you have to select your move in the checkboxes and to press the button "Next Step". What is your purpose? In order to cope well in this world you have to make more victories, and less losses and bad moves. You make victory when the lamp named "Victory" flashes. Respectively you make loss or bad move when the respective lamp flashes. Of course, to cope well in this world you have to understand it first. This is extremely difficult even if you know that behind the panel is hidden the game Tick-Tack-Toe. The main problem is that you do not see the entire internal state of the game. This is obvious because you see only five lamps which do not carry enough information. Anyway, if you spare enough time for experiments in this world then you will understand it and will start to cope well in it. I am sure that you will do this because you manage to cope well in the real world, which is much more complicated. Really, you spare about 20 years for education before understanding the real world. 1 This publication is partially supported by the KT-DigiCult-Bg project

International Journal "Information Theories & Applications" Sample Sheet 2 If you try to understand World 2 alone then you will understand the difficulties, which AI program has to overcome. It is better to try first the World 1. It is much easier because there is no hidden information in it. On every step you can observe the internal state of the World 1. In other words, the function View which gives the lamps status from the internal state of the world is inaction. A definition of AI We are going to make a program which is able to cope in World 2 because we want to build AI. Our first question is what is AI. We will accept the definition for AI which is given in [2, 3, 4, 5]. Here is a short description of this definition. For us AI will be a step device which copes well in an arbitrary world. What is a world? For us this is a set S of internal states, one starting state s0 and two functions World(s, d) and View(s). The function World will return the new state of the world from the current state and from the device's move (the state of the checkboxes). The function View will inform us what does our device see. That is, this function will return the state of the lamps from the current state of the world. One device copes better than another if it makes more victories and less losses. This definition differs from the so called Turing's test [6, 7, 8] because it separates the intellect from the education. Alan Turing described a device which copes well in the natural world. Actually, even the human being cannot do this without education. So his device is already educated before the start of the test or his device is specially built for the natural world and includes within itself all information about the real world. In the case with World 2 it is not a problem to build a program which copes well in Tick-Tack-Toe world. There are many programs which play this game very successfully (one of them you can find in [1]). Our goal is not to build a program specialised for World 2 but for a class of worlds as big as possible. The best case is if the real world is inside this class. So we will suppose that our program does not know anything for the world before it starts living (making steps). The AI program has to collect all information alone. This will make the task of building of AI program extremely difficult. Detailed description of World 2 In the World 2 you play Tick-Tack-Toe against an artificial partner which we will call Tom. The Tom's strategy is very simple. He plays every time randomly a correct move. You cannot see the whole board of the game but at every step you can see one cell by the state of the two yellow lamps. If the first lamp is on then this mean a cross. If the second lamp is on then this mean "O". If no lamp is on then there is nothing in the cell. Both lamps are never on together. up left/ down

International Journal "Information Theories & Applications" Sample Sheet 3 With the checkboxes you can select eight possible commands (moves). Four of them move your eye through the board. One command puts a cross at the position of the eye. Another one is the new game command. The last two commands are not used and they give bad move every time when you play them. When one Tick-Tack-Toe set is finished then one of the lamps Victory or Loss flashes depending on who won the set. If the set is equal then both lamps flash simultaneously. When after the end of the set you play the new game command then all cells are cleaned and become empty. The World 2 is made in this way because after the end of the set you will be able to continue to observe the Tick-Tack-Toe board in order to understand why you lost or won. Such observation is important for understanding of this world. Every time when you try to do something which is not allowed the lamp "Bad Move" will flash red and the internal state of the world will stay unchanged. Examples of bad moves: When you are in the first column and try to move left. When you try to put cross in the cell which is not empty or when the set is over. When you give the command new game before the end of the set. Model of the World 2 In order for AI to understand the World 2 it has to build a model of this world. Here we will build such a model, which will consist from very simple parts. Most of these parts will be final automata with maximum three states. For such small automata exists possibility AI to find them by brutal force or by more creative approach. For bigger automata there is not such possibility due to the combinatory explosion. The automate (1) which will describe the position of the eye is the following one: left/ / left left There are three states in this automate and they correspond to the left, middle and column of the board. The change of the state occurs when AI makes the move "left" or "". All other moves do not change the state of this automate. Here the flash stands for a "bad move". This means that if you try to play "left" from the left column then the lamp "bad move" will flash. Actually, this is the peculiarity of this automate, which will allow AI to find it. Actually, there is a huge number of final automata with three states but this one is special because it is connected with the rule that if the automate is in its first state and if AI plays "left" then the result is "bad move". From the other two states the move "left" every time is correct. Of course, this automate is fundamental for the understanding of the World 2 because it gives to AI the information in which column the eye is. Analogicaly, AI will find the automate (2), which will say in which row the eye is and this two automata together will give the co-ordinates of the eye. Also analogicaly, AI will find the automate (3) with two states which will give information whether the game is over or not and when you can play the "new game" command. Interesting in this automate is that it can change its state due to the lamp status (if one or both of the lamps "victory" or "loss" flash).

International Journal "Information Theories & Applications" Sample Sheet 4 new game/ Game victory or loss new game Game over In order to begin to understand the rules and to play without "bad moves" we will need some easy rules like: If AI sees cross and plays "put cross" then the result is a "bad move". Simple rules like this can be represented like final automate with a single state. Of course, all single state automata are equivalent and that is why we can accept that we have only one automate of that kind. In this way by constant rules and by deterministic automata we described the rules of World 2 and we can start playing correctly in it. Anyway this is not enough in order to understand it and to cope well in it. For this purpose we need to have an idea for the situation on the board (for the game status). Unfortunately, all possible situations on the board are too much. They are 3 on the power of 9. Of course, not all of these situations are really possible but they are too much anyway and it is impossible for AI to find an automate with so many states by brutal force. That is why we will describe the situation on the board in a different way. We will introduce a special undeterministic final automate which will be of second level because it will change its states depending on the condition of other automata. The first level automata, which we will use for this will be automata 1, 2 and 3. Actually, we will build 9 new automata - one for every possible co-ordinates (X, Y) of the eye. The condition "At X, Y" will be true if the automate (1) is at the state X and automate (2) is at the sate Y. The condition "Game over" will be true if the automate (3) is at the state "Game over". Here is what the automate (X, Y) looks like: empty at X, Y and put and not not at X, Y and put and not game over and new game What is the peculiarity of this automate, which will allow to AI to find it? This is the fact that when the automate (X, Y) is at the state "cross" and when the condition "At X, Y" is true then AI sees "cross". This peculiarity will also help to determine which state this undeterministic automate is in.

International Journal "Information Theories & Applications" Sample Sheet 5 After all this we can understand the World 2 and the fact that if AI puts cross then Tom will answer immediately by putting "O" on the board. Actually we need also the rule that Tom cannot put more than one "O" as a response. For this we need first order formula which goes beyond the model from final automata. Also we need to understand why we win or lose and for this we need the concept of algorithm in order to understand "line" and "diagonal" on the board. We have "line" if we can three successive times see cross and go left (without "bad move" on the first two "left"). After this work which has to be done we will have the model of World 2 and we can start planing the future in this world. To plan its next move AI can use the algorithm Min-Max like the other programs, which play Tick-Tack-Toe. Anyway, the direct use of this algorithm will bring combinatory explosion because if we think ten steps in the future then we will make only few real moves in this ten steps. In order to win the game AI has to have an algorithm for moving of the eye from any position X1, Y1 to any new position X2, Y2. Also it needs to have an algorithm for checking the situation of the board to find where Tom responded with "O". With applying of such algorithms AI can reduce the Min-Max algorithm to calculating only the real moves instead of calculating of all possible steps. Conclusion This paper gives an idea of how we can make a program which will cope successfully in a Tick-Tack-Toe world without knowing apriory anything about this world. This program will be not that far from AI. Bibliography [1] Dobrev D. Strawberry Prolog. In: http://www.dobrev.com [2] Dobrev D. AI Progect. In: http://www.dobrev.com/ai [3] Dobrev D. AI - What is this. In: PC Magazine - Bulgaria, November'2000, 12-13. [4] Dobrev D. AI - How does it cope in an arbitrary world. In: PC Magazine - Bulgaria, February'2001, 12-13. [5] Dobrev D. A Definition of Artificial Intelligence. In: Mathematica Balkanica, New Series, Vol. 19, 2005, Fasc. 1-2, 67-74. [6] Turing, A. M. Intelligent machinery. In: report for National Physical Laboratory (1948). In Machine Intelligence 7, eds. B. Meltzer and D. Michie, 1969. [7] Turing, A. M. Computing machinery and intelligence (1950). In: Mind 49, 433-460. [8] Turing, A. M. Can a Machine Think (1956). In: The World of Mathematics, ed. James R. Newman, Simon & Schuster, Vol. 4, 2099-2123. Author information Dimiter Dobrev - Institute of Mathematics and Informatics, BAS, Acad.G.Bonthev St., bl.8, Sofia-1113, Bulgaria; P.O.Box: 1274, Sofia-1000, Bulgaria; e-mail: d@dobrev.com