Git Product home page Git Product logo

pancake-problem's Introduction

Pancake Problem

CSE3111/CSE3213 Artificial Intelligence Homework #1

Fall 2019

1. Objective

The purpose of this homework is to teach you how to apply uninformed and informed search algorithms while solving a real problem and how to evaluate the performance of these algorithms.

2. Specification

In this homework, you will formulate and develop a solution to the below problem by applying uninformed and informed search algorithms discussed in class: Breadth First Search, Depth First Search, Depth Limited Search, Iterative Deepening Search, Uniform Cost Search, Greedy Best First Search, and A* Search.

Pancake sorting problem

This famous problem is usually stated as follows: Pancake sorting is sorting a disordered stack of pancakes in order of size when a spatula can be inserted at any point in the stack and used to flip all pancakes above it.

Task 1 โ€“ Implementation

In this homework, you will use source codes provided by AIMA textbook. You are free to use Java or Python as your programming language. After importing the AIMA libraries into your workspace, your job is to formulate and develop a solution to the pancake problem.

  1. Your program should have a simple console-based menu which takes the number of pancakes(๐‘) from the user. You should also provide two options to the user for the initial ordering of ๐‘ pancakes:

    • The program randomly generates a permutation of ๐‘ pancakes as the initial ordering.

    • The initial ordering of ๐‘ pancakes is determined by the user.

  2. You are also provided the base Java file to be used for testing. Your job is to implement the empty methods in this demo file (PancakeProblemDemo). (If you are using Python, write a similar script)

  3. You have to use the classes and methods for searching provided in AIMA. Do not implement your own search algorithms.

  4. You can get help from NQueensDemo.java and EightPuzzleDemo.java applications located under the package aima.gui.demo.search.(Python users, see test_search.pyfile under tests directory.)

  5. At least, you will need to create your own classes for the following:

    • PancakeState(representing the state)
    • PancakeActionwhich extends aima.core.agent.impl.DynamicAction(representing possible actions)
    • PancakeProblem which implements aima.core.search.framework.problem.Probleminterface (representing the problem formulation for the pancake sorting problem).

pancake-problem's People

Contributors

cangurdev avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.