Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help on d and e I don't know how to implement the algorithm in Python either. The sliding-title puzzle consists of five black

I need help on d and e I don't know how to implement the algorithm in Python either.

The sliding-title puzzle consists of five black titles, five white titles, and an empty space in the

configuration shown in the Figure.

image text in transcribed

The puzzle has two legal moves (i.e. actions) with associated costs:

  1. A title may move into an adjacent empty location. This has a cost of 1.
  2. A title can hop over one, two or three other tiles into the empty position.

This has a cost equal to the number of tiles jumped over + 1: i.e. a cost of 2, 3 or 4.

The goal is to have all the white tiles to the right of all the black tiles.

The position of blank is not important.

  1. [30] Problem Formulation

Clearly formulate the problem in terms of 6 factors below. not a verbal description.

  1. [5] States: how do you define and represent a state?

e.g.) (a, b, c, d, e, f, g, h, i, j, k)

where a is the tile located in the 1st location, b is the tile in the 2nd location, etc.

(tile@loc1, tile@loc2, tile@loc3, tile@loc4, tile@loc5, tile@loc6, tile@loc7, tile@loc8, tile@loc9, tile@loc10, tile@loc11)

  1. [5] Initial State

(W,W,W,W,W,E,B,B,B,B,B)

  1. [5] Goal State

(E,B,B,B,B,B,W,W,W,W,W) or

(B,E,B,B,B,B,W,W,W,W,W) or

(B,B,E,B,B,B,W,W,W,W,W) or

(B,B,B,E,B,B,W,W,W,W,W) or

(B,B,B,B,E,B,W,W,W,W,W) or

(B,B,B,B,B,E,W,W,W,W,W) or

(B,B,B,B,B,W,E,W,W,W,W) or

(B,B,B,B,B,W,W,E,W,W,W) or

(B,B,B,B,B,W,W,W,E,W,W) or

(B,B,B,B,B,W,W,W,W,E,W) or

(B,B,B,B,B,W,W,W,W,W,E)

  1. [10] The possible Actions: Formulate each action with the current state and its successor states.

e. [5] A step cost and a path cost

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions