Question: 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.

I need help on d and e I don't know how to

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!