GithubHelp home page GithubHelp logo

Comments (7)

AnimeshSinha1309 avatar AnimeshSinha1309 commented on August 22, 2024

screenshot from 2018-12-13 18-46-58
This is an implementation of the probability agent idea in the UC Berkeley Course. The Outer Rim (Used Here) can be used to show what the measurement was, Stinch(w), Breeze(p), Both (wp) or Safe (), and the Inner portion of the square can be used to signal our inferences. i.e. Wumpus (W), Pit (P), Both (WP), or Nothing ().

We can choose to represent these as:

  • 4 Colors with a color key on Outer and Inner Rim. Outer rim has measurements, inner has inferences.
  • Two halves of the square having labels of W and P. Upper half has measurements, lower has inferences.

The good thing about the color and rim arrangement is that it makes it easier to see that the measurements affect the square next to it. But the label and halves arrangement make it easier to read the labels and see the propositional logic.

from aima-javascript.

GaurangTandon avatar GaurangTandon commented on August 22, 2024

I was thinking of the following:

  • rim color indicates the measurement
  • text inside the square indicates inferences. i.e. Wumpus (W), Pit (P), Both (WP), or Nothing ().

Also, as you said, when I implement the grid I should have to expose some methods for you to use. Can you elaborate what would those methods be? Afaict, there are two buttons in the UCB dialog you've shown above, and also some information top-right. What do those do and are those the only API methods you would need, or are more required?

from aima-javascript.

AnimeshSinha1309 avatar AnimeshSinha1309 commented on August 22, 2024

No no, We need very different API. Each Grid must be an object. And That grid object must have as one of its instance variables an array of small block objects. Each of the small block objects must provide setMeasurement(measurement) and setInference(inference). Also, we must have a marker showing where we are, like the green dot in the current game and a way to move it, but that maybe later. Finally we need a Click Event Listener, onclick(function callback(x : int, y : int))

We will need to scale this as we go along. On the probability chapter, we will need to change our inferences with are W or no W, to 0.86 W form, color the background to give a feel of what the gradient is like, and maybe even make our grid bigger. So, 4 x 4 may not suffice. Let's try to be as flexible as can be, cause this model of the world spans many chapters and gives us great power, even if we don't implement those chapters.

from aima-javascript.

GaurangTandon avatar GaurangTandon commented on August 22, 2024

Thanks for the additional information, that will certainly help me build a better API. On it.

from aima-javascript.

AnimeshSinha1309 avatar AnimeshSinha1309 commented on August 22, 2024

This is what my SVG outline looks like. See if you can use the SVG library to improve it. The DOM thing works, and my implementation is similar, but SVG-TypeScript combo seem to give more flexibility.
wumpusworld
Having Labels inside is the goal now. Then we can start thinking of a propositional logic agent.
For Documentation on the SVG Manipulation, check: SVGjs

from aima-javascript.

GaurangTandon avatar GaurangTandon commented on August 22, 2024

I need to know what exactly were the flexibility issues in the previous files to be sure I won't reintroduce the same issue again.

  • I didn't use the class syntax because of lack of support of private variables.
  • I don't understand why we need SVG instead of DOM.
  • I also don't get the need to start from scratch.

And that's probably because I haven't played the game yet. Please give me a link to whichever implementation on the internet is closest to your thoughts and I'll play it first.

from aima-javascript.

AnimeshSinha1309 avatar AnimeshSinha1309 commented on August 22, 2024

I have implemented the full version, please take a look at the demo here. Closing out this issue.

from aima-javascript.

Related Issues (2)

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.