AUTOMATED REASONING. Agostino Dovier. Udine, December Università di Udine CLPLAB

Similar documents
AUTOMATED REASONING. Agostino Dovier. Udine, December Università di Udine CLPLAB

Stefano Bistarelli, Andrea Formisano, Marco Maratea (Eds.)

Referral Agreement. This Agreement is between Berkshire Real Estate (Broker), of Omaha Nebraska, and. (Address) (City) (State) (Zip)

What Can We Do Now? Regulating Short-Term Rentals and Small Cell Deployment. Elisha D. Hodge MTAS Legal Consultant TCMA Conference November 2, 2018

BACH HOUSE CORE TOUR. -Interpreters should be familiar with material at each stop, as they will operate on a rotating basis.

From Sep 01, 2017 to Sep 30, 2017.

HARBOR VIEW ON GOLDEN GATE POINT CONDOMINIUM ASSOCIATION, INC.

THE VALUATION ANALYST

HC FINAL COST CERTIFICATION FORM AND INSTRUCTIONS

WHAT ARE THEY SAYING?

The Analytic Hierarchy Process. M. En C. Eduardo Bustos Farías

IA 72 +/- $864,000 NEW LISTING

LINEAR ALGEBRA FRIEDBERG PDF

County Lot C Redevelopment

CONTRACT/APPLICATION FOR WATER & SEWER UTILITY SERVICE

Property address: Target Move-In date: / / Resident: Cell Phone : ( ) - Social Security # : - - Date of Birth ; / /

Automatic Cryptanalysis of Block Ciphers with CP

Buy a New Home Without A Bank Loan

August Continued on Page 2: August Renters 1. Lease with Right to Purchase 2. Word Search Puzzle 4. Word Search Solution 5


NEWBERRY PLAZA CONDOMINIUM ASSOCIATION SALES PACKET CHECKLIST

THIS PAPER IS NOT TO BE REMOVED FROM THE EXAMINATION HALLS UNIVERSITY OF LONDON LA3003 ZA

OFFERING MEMORANDUM PRICE: $240,000 ($24,000 / Unit)

Congratulations on your purchase of a Victory Instruments timepiece. It is designed to make a personal statement of success and give you years of

CHARTER TOWNSHIP OF OSHTEMO KALAMAZOO COUNTY, MICHIGAN AMENDED AND RESTATED WATER CONNECTION FEES EFFECTIVE: JANUARY 1, 2016 CONNECTION FEES

RENTAL REGISTRATION APPLICATION

Teacher s Pet Publications

RENTAL APPLICATION. First Middle Last

CHARTER TOWNSHIP OF OSHTEMO KALAMAZOO COUNTY, MICHIGAN AMENDED AND RESTATED WATER CONNECTION FEES EFFECTIVE: JANUARY 1, 2019 CONNECTION FEES

Lecture Notes in Computer Science 7149

The City of MIDWEST CITY 100 N. Midwest Blvd * Midwest City, Oklahoma (405) *TDD (405) * FAX (405)

Ohio Department of Transportation. Division of Engineering. Office of Real Estate. Synergy. Real Estate Business Analysis

Polynomial Project. Algebra 1

ASC 842 Lease Accounting Quantitative Disclosure Requirements for Tenants You Need to Know. AUTHOR: Michael Nichols, Chief Financial Officer

Investit Software Inc. Investor Pro

Deal Analyzer For Flips

Cheat Sheet 3 Formulas to Know When Investing in Multi-Family Homes

This project includes information on housing in the United States from 1970 to 2010.

Mansions East Lease Application Check List

MINUTES BUILDING BOARD OF REVIEW 1:00 P.M., November 9, 2015 Third Floor, Jesse Lowe Conference Room Omaha Civic Center Farnam Street

WEGO Property Management

ASSURED SHORTHOLD TENANCY AGREEMENT APRIL 2018 EDITION RESIDENTIAL LANDLORDS ASSOCIATION

APPLICATION FOR CONDOMINIUM RENTAL

learning.com Streets In Infinity Streets Infinity with many thanks to those who came before who contributed to this lesson

planease Exchange Recap

Broker Reciprocity/ Internet Data Display (IDX) Rules September, 2012

PLZ Investments, LLC Highway 290 Business, Ste.12 P.O. Box 161, Prairie View, Texas Leasing Office: Tel:

Page 1. Date: This agreement is between us: the landlord or landlords. and you (individually and together): the tenant or tenants

Do College Towns Have Stronger Residential Real Estate Markets?

Collateral Underwriter Overview. National Association of REALTORS January 23, 2015

Metallic Mineral Exploration in Minnesota: A Look at 46 Years of State Mineral (Nonferrous) Leasing Data 1966 to 2012

SECTION 2 REPUBLICATION OF BROKER RECIPROCITY DATABASE ON INTERNET PERMITTED..

Real Estate & REIT Modeling: Quiz Questions Module 1 Accounting, Overview & Key Metrics

BROADWAY STORAGE RENTAL SPACE AGREEMENT E. Broadway St. Missoula, MT Ph: (406)

Calculating Crop Share, Cash and Flexible Cash Lease Rates

EXECUTIVE SUMMARY... 1 MOST COMMON VISITOR PARKING PROBLEMS... 1 TYPICAL VISITOR PARKING POLICIES... 3

Six Steps to a Completed Appraisal Report

The Signature Club at Greenview Community And Condominium Associations Clubhouse Complex Rules Effective July 17, 2017

Business English. (Answer Keys)

20 Acres Lumpkin Farmland

Advanced M&A and Merger Models Quiz Questions

The following are required to submit an application to rent property with New Start Realty & Relocation.

Acres Fresno County, California MATURE VINEYARD PROPERTY

Use of Comparables. Claims Prevention Bulletin [CP-17-E] March 1996

Intel Realsense D435 3D Active IR Stereo Depth Camera

TABLE OF CONTENTS SECTION II COMPLETING ODOMETER DISCLOSURE DOCUMENTS

Lorenzo Village Region: San Gimignano Guide Price: 6,770-11,729 per week Sleeps: 37

1. Acting Chairman Langdon called the meeting to order at 4: 07 PM. Acting Chairman

LAND FOR SALE ACRES 9040 TOLOFF STREET, ANCHORAGE, ALASKA 99507

Stokes Ventures, Inc.

Neighborhood Revitalization

Studio: 1 person min, 2 people max

PROBATE WORKSHEET. Please use the back or another sheet if enough space is not provided. Name of Deceased: Last Home Address of Deceased:

1,495,000 inc. of agency fees

Membership Application

If you have any questions concerning the above, please call the Graduate & Family Housing Office at

INSTRUCTIONS FOR COMPLETING THE 2018 TANGIBLE PERSONAL PROPERTY SCHEDULE FOR REPORTING COMMERCIAL AND INDUSTRIAL PERSONAL PROPERTY

Devin Defriza Harisdani 1*, Edward Anugrah Zai 1

ORDINANCE NO AN ORDINANCE ESTABLISHING A UNIFORM SYSTEM FOR STREET ADDRESSING IN EMERY COUNTY

Financial Details on standalone basis (optional)

Reasons it s Time to Update Your Ordinances

Using the ProVal Private Finance Module Version 9.09 to Appraise Schemes for Rent to Homebuy.

You have indicated that you intend to sell your home in Addison Trace to one or more people.

Indoor climate of an unheated apartment and its impact on the heat consumption of adjacent apartments

Network Analysis: Minimum Spanning Tree, The Shortest Path Problem, Maximal Flow Problem. Métodos Cuantitativos M. en C. Eduardo Bustos Farías 1

Laundry Master bedroom Master closet

LSL New Build Index. The market indicator for New Builds March Political events

A Revolution In Real Estate Sales How To Sell Real Estate

Agency Duties. Objectives. Upon completion of this section the student should be able to:

Sig Zvejnieks, Karen Hall, Lori Litzen, Jim Coleman, Barbara Landers, Bill McCollam, and Nancy Trautman.

Rental Application checklist ONLY CLEAN & RESPONSIBLE PEOPLE WHO PAY RENT ON TIME MAY APPLY

SPEAKERS LSDR INTERLUDES. Patrick Shearn - Poetic Kinetics

STANDARD FORM OF RENTAL AGREEMENT PDF

Scores for Valuation Reports: Appraisal Score & BPO Score. White Paper. White Paper APRIL 2012

HOUSE RULES HUD Multifamily FASTForms Description

COLORADO DEPARTMENT OF AGRICULTURE. Plant Industry Division

PROJECT: P 0037(129)207 PCN: 039K BROWN COUNTY. S.D. Highway 37 From Aspen Ave to U.S. Highway 12 in Groton

20 Third Street S.W. #204 Winter Haven, FL

Variance Application

The following diagrams illustrate the use of various strategies outlined in this report to form more healthy and well-served communities

Transcription:

AUTOMATED REASONING Agostino Dovier Università di Udine CLPLAB Udine, December 2016 AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 1 / 24

THE HANOI TOWER AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 2 / 24

THE HANOI TOWER AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 2 / 24

THE HANOI TOWER Representation using inpeg(time, disk, peg) and on(time, disk above, disk below/floor). The top(time, peg, disk) is defined from the other predicates. peg(1..3). disk(1..n). tempo(0..t). % Initial state (you can use others) inpeg(0,d,1) :- disk(d). on(0,d,d+1) :- disk(d),disk(d+1). on(0,n,floor). % Goal state (all in the 2nd peg) goal(d) :- inpeg(t,d,2), disk(d). :- disk(d), not goal(d). AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 3 / 24

THE HANOI TOWER Representation using inpeg(time, disk, peg) and on(time, disk above, disk below/floor). The top(time, peg, disk) is defined from the other predicates. peg(1..3). disk(1..n). tempo(0..t). % Initial state (you can use others) inpeg(0,d,1) :- disk(d). on(0,d,d+1) :- disk(d),disk(d+1). on(0,n,floor). % Goal state (all in the 2nd peg) goal(d) :- inpeg(t,d,2), disk(d). :- disk(d), not goal(d). AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 3 / 24

HANOI TOWER Action: move(time,pegx, pegy) % There is one and only one move at time T 1{ move(t,x,y): peg(x), peg(y), X!= Y} 1 :- tempo(t), T < t. % Smaller above :- on(t,a,b), tempo(t), disk(a), disk(b), A >= B. % If there are no disks, no moves :- move(t,a,b), empty(t,a), tempo(t), peg(a), peg(b). AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 4 / 24

HANOI TOWER Auxiliary predicates: covered(t,d2) :- on(t,d1,d2), tempo(t), disk(d1), disk(d2). top(t,a,d) :- inpeg(t,d,a), not covered(t,d), tempo(t), disk(d), peg(a). nonempty(t,a) :- inpeg(t,d,a), tempo(t), disk(d), peg(a). empty(t,a) :- not nonempty(t,a), tempo(t), peg(a). top(t,a,floor) :- empty(t,a), tempo(t), peg(a). moved(t,d) :- top(t,a,d), move(t,a,b), tempo(t), disk(d), peg(a), peg(b). AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 5 / 24

HANOI TOWER % 1. change on of moved disk on(t+1,d1,d2) :- top(t,a,d1), top(t,b,d2), move(t,a,b), tempo(t), tempo(t+1), peg(a), peg(b), disk(d1), disk(d2). on(t+1,d,floor) :- top(t,a,d), move(t,a,b), empty(t,b), tempo(t), tempo(t+1), peg(a), peg(b), disk(d). % 2. change inpeg of moved disk inpeg(t+1,d,b) :- top(t,a,d), move(t,a,b), tempo(t), tempo(t+1), peg(a), peg(b),disk(d). % Inertia on(t+1,d,floor) :- on(t,d,floor), not moved(t,d), tempo(t), tempo(t+1), disk(d). on(t+1,d1,d2) :- on(t,d1,d2), not moved(t,d1), tempo(t), tempo(t+1), disk(d1), disk(d2). inpeg(t+1,d,a) :- inpeg(t,d,a), not moved(t,d), tempo(t), tempo(t+1), peg(a), disk(d). AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 6 / 24

SAM LLOYD S PUZZLE AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 7 / 24

SAM LLOYD S PUZZLE tempo(0..t). val(0..8). range(0..2). % 0 1 2 % X=0 % 3 4 5 % X=1 % 6 7 8 % X=2 %%%%%%% % 0 1 2 <- Y %%%%%% %% "0" is the empty cell (the hole) %% Define the predicate %% cell(time T, row X, column Y, value V) %%% Input (example) cell(0,0,0,1). cell(0,0,1,2). cell(0,0,2,5). cell(0,1,0,3). cell(0,1,1,4). cell(0,1,2,8). cell(0,2,0,6). cell(0,2,1,0). cell(0,2,2,7). %%% Goal goal(x,y) :- range(x), range(y), cell(t,x,y,3*x+y). :- range(x),range(y), not goal(x,y). AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 8 / 24

SAM LLOYD S PUZZLE %%% The move moves the hole 1{ move(t,up); move(t,down); move(t,left); move(t,right)}1 :- tempo(t), tempo(t+1). hole(t,x,y) :- cell(t,x,y,0), tempo(t), range(x), range(y). % Forbidden moves :- tempo(t), move(t,up), range(y), hole(t,0,y). :- tempo(t), move(t,down), range(y), hole(t,2,y). :- tempo(t), move(t,left), range(x), hole(t,x,0). :- tempo(t), move(t,right), range(y), hole(t,x,2). % New position for the hole moved(t,x-1,y) :- hole(t,x,y), move(t,up), tempo(t),range(x),range(y). moved(t,x+1,y) :- hole(t,x,y), move(t,down), tempo(t),range(x),range(y). moved(t,x,y-1) :- hole(t,x,y), move(t,left), tempo(t),range(x),range(y). moved(t,x,y+1) :- hole(t,x,y), move(t,right), tempo(t),range(x),range(y). AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 9 / 24

SAM LLOYD S PUZZLE % New cell contents cell(t+1,x,y,0) :- moved(t,x,y), tempo(t), tempo(t+1), range(x), range(y). cell(t+1,x1,y1,v) :- hole(t,x1,y1), moved(t,x2,y2), cell(t,x2,y2,v), tempo(t), tempo(t+1), val(v), range(x1), range(x2), range(y1), range(y2). % Inertia affected(t,x,y) :- hole(t,x,y), tempo(t), range(x), range(y). affected(t,x,y) :- moved(t,x,y), tempo(t), range(x), range(y). cell(t+1,x,y,v) :- cell(t,x,y,v), not affected(t,x,y), tempo(t), tempo(t+1), range(x), range(y), val(v). AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 10 / 24

SOKOBAN RULES Sokoban is a puzzle invented by Hiroyuki Imabayashi in 1980 Sokoban means significa warehouseman (magazziniere) in Japanese It is one of the first videogames. It has only three rules. AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 11 / 24

SOKOBAN REPRESENTATION top(c2r5,c2r4). right(c3r2,c4r2). right(c3r6,c4r6). top(c2r6,c2r5). right(c4r2,c5r2). right(c4r6,c5r6). top(c3r3,c3r2). right(c5r2,c6r2). top(c3r4,c3r3). right(c6r3,c7r3). box(c6r3). top(c3r5,c3r4). right(c2r4,c3r4). box(c5r4). top(c3r6,c3r5). right(c3r4,c4r4). box(c5r5). top(c5r5,c5r4). right(c4r4,c5r4). top(c5r6,c5r5). right(c5r4,c6r4). storage(c3r3). top(c6r3,c6r2). right(c6r4,c7r4). storage(c3r4). top(c6r4,c6r3). right(c2r5,c3r5). storage(c4r4). top(c6r5,c6r4). right(c5r5,c6r5). top(c7r4,c7r3). right(c6r5,c7r5). sokoban(c4r6). top(c7r5,c7r4). right(c2r6,c3r6). Solve it defining the predicate push(source cell,direction,destination cell), where direction is up, down, left, right. AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 12 / 24

PEG SOLITAIRE AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 13 / 24

RUBIK S CUBE AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 14 / 24

RUBIK S CUBE AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 15 / 24

BRAINTWIST AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 16 / 24

12 COINS I HAVE NOT A PROGRAM FOR IT! There are 12 coins Exactly one of them is false The false one weights differently from the others (heavier or lighter? Unknown) We have a balance: How can you discover the false coin in 3 weights? AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 17 / 24

12 COINS I HAVE NOT A PROGRAM FOR IT! There are 12 coins Exactly one of them is false The false one weights differently from the others (heavier or lighter? Unknown) We have a balance: How can you discover the false coin in 3 weights? AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 17 / 24

SMULLYAN AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 18 / 24

SMULLYAN AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 18 / 24

SMULLYAN AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 18 / 24

SMULLYAN AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 18 / 24

SMULLYAN AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 18 / 24

SMULLYAN AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 18 / 24

SMULLYAN AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 18 / 24

A NGRY B IRDS AGOSTINO D OVIER (CLPLAB) AUTOMATED REASONING U DINE, D ECEMBER 2016 19 / 24

ANGRY BIRDS AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 19 / 24

ASP solving (in short) AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 20 / 24

A BSTRACT ASP SOLVING Let us see an abstract description of the ASP solver proposed by Yuliya Lierler (Univ. Nebraska at Omaha) Guess who is who in the picture... AGOSTINO D OVIER (CLPLAB) AUTOMATED REASONING U DINE, D ECEMBER 2016 21 / 24

SMODELS: ABSTRACT VIEW AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 22 / 24

SMODELS: ABSTRACT VIEW AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 22 / 24

SMODELS: ABSTRACT VIEW AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 23 / 24

CLASP (AND CUD@ASP) Input Initial Propagation LEVEL=1 Fail Y Violation? N NoGoodCheckandPropagate Fail Y LEVEL=1 Y Violation N TOTAL Y Return A N N Selection Conflict Analysis Update A; Increment LEVEL Update ; Update A; Update LEVEL The key of CLASP efficiency is conflict analysis and nogood learning AGOSTINO DOVIER (CLPLAB) AUTOMATED REASONING UDINE, DECEMBER 2016 24 / 24