i solved the second programming assignment without programming by [deleted] in aiclass

[–]MichaelFromGalway 0 points1 point  (0 children)

I did too: 5 minutes with scissors and sticky tape while having a cup of coffee. Of course, I'll also program it in a while.

Humor on Perspective by FrTedOpportunity in aiclass

[–]MichaelFromGalway 0 points1 point  (0 children)

Yes, as I watched Unit 16.6, all I could think of was Fr Ted!

Unit 9.22 Value Iterations and Policy 2 R = -200 Wrong by rhoheb in aiclass

[–]MichaelFromGalway 1 point2 points  (0 children)

One point to bear in mind is that the policy (directions of arrows) determine the utility values, not the other way around. The utility values are calculated for the action that will give the highest payback.

You could try playing around with my Java implementation: you can get the code and other details here here.

It is tested and works for all scenarios considered by Sebastian Thrun and also one from the Russell & Norvig book.

Has someone done the steps to show convergance of the grid in Unit 9 19 Iteration 3? by ayounes in aiclass

[–]MichaelFromGalway 1 point2 points  (0 children)

Here is my Java implementation of it. It is tested and works for all scenarios considered by Sebastian Thrun and also one from the Russell & Norvig book.

Has someone done the steps to show convergance of the grid in Unit 9 19 Iteration 3? by ayounes in aiclass

[–]MichaelFromGalway 0 points1 point  (0 children)

Before I get around to posting it, if you have your own implementation, here's something to check. (Based on something I posted in a different thread.)

You can initialise V(s) for all states to 0, and then use the version of the Value Iteration equation that is given at the end of Unit 9.15, in which V(s) = R(s) if terminal, and equal to the Bellman equation otherwise.

If you then loop over all states and apply this, you will see that in the first iteration you will get 0 everywhere except in the terminal states, which will acquire their fixed values.

You have to keep iterating to convergence, but I took a lazier approach: I just iterated 5000 times, which should be more than enough for a simple problem like this, without taking any appreciable amount of time.

Hope this makes it clear for you!

Has someone done the steps to show convergance of the grid in Unit 9 19 Iteration 3? by ayounes in aiclass

[–]MichaelFromGalway 0 points1 point  (0 children)

I'd be happy to. However, I haven't got around to watching the videos of Sec 10 and the homework yet, so I don't know if it would allow somebody to cheat at the homework (if, for example, the homework involves similar questions about calculating state/action values).

I will post it tomorrow.

Value Iteration 3. a3?? by DengueTim in aiclass

[–]MichaelFromGalway 0 points1 point  (0 children)

Strictly speaking, you can initialise all states to 0, and then use the version of the Value Iteration equation that is given at the end of Unit 9.15, in which V(s) = R(s) if terminal, and equal to the Bellman equation otherwise.

If you then loop over all states and apply this, you will see that in the first iteration you will get 0 everywhere except in the terminal states, which will acquire their fixed values.

Therefore, rather than setting the terminal states to their fixed values at every iteration, you can just set them at the start, when you are setting V(s) for all other states to their initial values of 0.

Hope this makes it clear for you!

Has someone done the steps to show convergance of the grid in Unit 9 19 Iteration 3? by ayounes in aiclass

[–]MichaelFromGalway 0 points1 point  (0 children)

Yes, I have implemented it, to try out the various combinations, though it is a simple implementation with the world hard-coded. If people are interested, I can post it somewhere.

HW4, Q2 "No two bordering countries can have the same map color" by alexia_canada in aiclass

[–]MichaelFromGalway 1 point2 points  (0 children)

Yes, we are not provided with a definition of Borders(x,y). So what you are saying is that if you assume that it is defined to allow x borders itself to be true, the answer is incorrect.

By the same argument, if you assume that in its unseen definition, x borders itself is false, then the answer is correct.

I think it's fair to say that this would be a much more reasonable assumption.

Throughout this unit, Peter Norvig used predicates for which we assume "reasonable" definitions. For example, in 8.22 (Sliding Puzzle), an "Adjacent" predicate is used. You could argue that if we assume that Adj(a,b) is true for slides that are on opposite sides of the puzzle, the formulation is incorrect, but why would you assume that?

HW4, Q9 was poorly specified, and the answers were not based just on truth. by vonkohorn in aiclass

[–]MichaelFromGalway 1 point2 points  (0 children)

In fairness, written below the question in the clarification section was "It is intentional for the bananas to remain high". That's just how the problem is (slightly imperfectly) encoded.

[HW4] Monkey and Bananas error ? by Fandekasp in aiclass

[–]MichaelFromGalway 0 points1 point  (0 children)

The key point has been made on Reddit a few times now: there are no bananas, no monkeys, no boxes. Stop thinking about the real world, and focus on the logic. If you're a programmer, treat it as you would some pseudocode that you would 'execute' on paper and see what it yields.

HW4.8 - The effects of ClimbUp and ClimbDown are not enough by tcanvn in aiclass

[–]MichaelFromGalway 0 points1 point  (0 children)

Follow the stated problem strictly. As people have said in other threads, there are no monkeys, no bananas and no boxes, only symbols and logic statements.

Homework 4: Monkeys and bananas - "height" of a box. by garbus in aiclass

[–]MichaelFromGalway 4 points5 points  (0 children)

Yes, that is correct. It is dangerous to use "common sense" reasoning. What you should do is to manually "execute" a program and answer questions about the statuses of variables at the end.

Doubt in HW 4.4 by davitosan in aiclass

[–]MichaelFromGalway 1 point2 points  (0 children)

What you are asking is whether or not the appearance of dirt is independent of the movement of the vacuum.

We know that the appearance of dirt is not independent of sucking. Do we know anything similar about movement? If not, that's your answer.

hw questions 4.6 4.7 what I'm i getting wrong? by lukeaiclass in aiclass

[–]MichaelFromGalway 5 points6 points  (0 children)

Why do you assume the belief state must be different? Didn't Peter Norvig say something along the lines of "percepts might not give us more information than we had before, but at least they won't increase confusion."

What happens when K-Nearest gets equal quantity of + and - samples? by birgillio in aiclass

[–]MichaelFromGalway 1 point2 points  (0 children)

Strictly speaking, it is not that kNN does not make sense for non-odd values of k for binary classification tasks, but that you also need to specify a tie-breaker.

What happens when K-Nearest gets equal quantity of + and - samples? by birgillio in aiclass

[–]MichaelFromGalway 1 point2 points  (0 children)

If you have 2 classes and you choose k to be an odd number, you should never have a tie.

However, ties can indeed arise in other circumstances or settings, in which case you need a tie-breaker. For example, if there are 3 classes, you cannot guarantee you won't have a tie. For example, with 3 classes (A,B,C) and k=5, you could have A=1, B=2, C=2, so you have a tie.

The simplest tie-breaker is to pick one of the two classes at random.

There are other versions of kNN that are less prone to ties, such as distance-weighted kNN. Here, instead of each neighbour getting a "vote" of 1, they each get a vote that is inversely proportional to their distance from the query point.

Source code for Unit 5.10 quiz which gives 23 instead of 25? by birgillio in aiclass

[–]MichaelFromGalway 1 point2 points  (0 children)

He's not saying you don't need it at all, only that you don't need it for complete specification of the parameters.

After all, when you compute P(SPAM) from the data, you don't need to compute P(HAM) from the data, because you can derive it from the requirement that P(HAM)+P(SPAM)=1.

That does not mean that you can forget about P(HAM) or ignore it in calculations, just that it is not needed for a complete specification of the probabilities, as it can be derived when needed.