[Solved] CECS451 Assignment 6

30 $

File Name: CECS451_Assignment_6.zip
File Size: 188.4 KB

SKU: [Solved] CECS451 Assignment 6 Category: Tag:

Or Upload Your Assignment Here:


1. Develop a minesweeper solver using a logical agent.

  1. Find py, and please do not modify it.
  2. You can use the methods, checkcell(), showcurrent(), isfail(), checkmines() methods and the variable, flags.
  • You should use flags variable to keep track of the candidate locations of the mines. It is a list of tuples which are the coordinates of the mines. i.e., (row, col).
  1. checkcell(): you can check whether a cell contains a mine or not. Please be careful of using this method. If you query the locations of mines, you can’t proceed the game. It always return your current grid which is 2d array of integers.
  2. showcurrent(): It shows your current grid. vi. isfail(): It returns whether the game is over.
  • checkmines(): It checks your flags is identical to the actual locations of mines.
  • Please report the total running time to solve a game of 16×16 grid with 40 mines. ix. Submit your solver, ipynb.

Suggested Strategy

0 1 2 3

—————–

  • | 0 | 1 | | |

—————–

  • | 1 | 2 | | |

—————–

  • | | | | |

—————–

  • | | | | |

—————–

  • Build equations from given information.

X2,0 + X2,1 = 1

X0,2 + X1,2 = 1

X2,0 + X2,1 + X2,2 + X0,2 + X1,2 = 2

X2,0 X2,1 X2,2 X0,2 X1,2 T/F
0 0 0 0 0 F
0 0 0 0 1 F
0 0 0 1 0 F
0 11 00 11 01 1 0 000…1 1 1001 00111 TTTTF

CECS 451 Assignment 6 – Page 2 of 2

  • Enumerate all combinations of 0 or 1 for given variables, then check whether they satisfy all the equations.
  • Now you know X2,2 = 0, then try checkcell((2,2)).

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CECS451 Assignment 6
30 $