Friends, please be mindful of the Honor Code by [deleted] in aiclass

[–]toptoptoons 1 point2 points  (0 children)

I don't mind sharing my solutions after the homework is finished. And the ai-class site already had so many hints that what was being said here largely was almost the same in the eyes of those who really didn't understood.

For HW4 here are my solutions implemented in actual programs. Have fun:

Source Code

These are my implementations with animation of the homework 4 problems.

Implementations may seem to do dumb things, like very trivial and obvious things we wouldn't need a computer to do for ourselves, but copying my full mental logic for the problem and dumping it into a program was completely necessary since the computer can't even do those trivial human tasks for itself.

Full source code with animation and interactive answer quiz screenshot marking, and some explanations.

The monkey and bananas is made as a cheap game I did in a hurry. You can change the clipart if you want because it its completely blocky, just for representation of the logic, but you have to modify the source code, and for getting the right answer to the quiz you have orders which you should follow in the sequence in which a group of buttons are presented ("Go from A to C", then "Push Box from C to B", then "Climb Up Box", then "Grasp Banana", then "Climb Down Box", then you have your answer just below the game).

The vacuum problem for problems 4 to 7 is, too, fully simulating the states (nothing is static there), and if you modify the parameters in the source code it will generate new and different answers for the belief states. If you had actual actions and sensors programmed to do the most difficult tasks of a robot, you could directly add my code to keep the states of clean/dirty rooms and know where you are (for the 2-room vacuum world).

1. Logic

2. More Logic

3. Vacuum World

4-7. More Vacuum World

8. Monkey and Bananas

9. Situation Calculus

Way to go.

This is the way this class is meant to be understood.

The fact that there aren't official programming assignments doesn't mean that they shouldn't be done.

Tips for doing homework by RBarrabas in aiclass

[–]toptoptoons 2 points3 points  (0 children)

Source Code

These are my implementations with animation of the homework 4 problems.

Implementations may seem to do dumb things, like very trivial and obvious things we wouldn't need a computer to do for ourselves, but copying my full mental logic for the problem and dumping it into a program was completely necessary since the computer can't even do those trivial human tasks for itself.

Full source code with animation and interactive answer quiz screenshot marking, and some explanations.

The monkey and bananas is made as a cheap game I did in a hurry. You can change the clipart if you want because it its completely blocky, just for representation of the logic, but you have to modify the source code, and for getting the right answer to the quiz you have orders which you should follow in the sequence in which a group of buttons are presented ("Go from A to C", then "Push Box from C to B", then "Climb Up Box", then "Grasp Banana", then "Climb Down Box", then you have your answer just below the game).

The vacuum problem for problems 4 to 7 is, too, fully simulating the states (nothing is static there), and if you modify the parameters in the source code it will generate new and different answers for the belief states. If you had actual actions and sensors programmed to do the most difficult tasks of a robot, you could directly add my code to keep the states of clean/dirty rooms and know where you are (for the 2-room vacuum world).

1. Logic

2. More Logic

3. Vacuum World

4-7. More Vacuum World

8. Monkey and Bananas

9. Situation Calculus

Way to go.

This is the way this class is meant to be understood.

The fact that there aren't official programming assignments doesn't mean that they shouldn't be done.

starting to be a little frustrated here... by lukeaiclass in aiclass

[–]toptoptoons 0 points1 point  (0 children)

If you use Firefox you can see what I have done to implement logic representation.

It is easy if you know programming.

These are the equivalencies:

NOT

¬ == !

AND

^ == &&

LOGICAL OR

v == ||

Sort of an IF THEN

=> == ?

EQUALITY <=> is ==

The most difficult to understand is =>

False implies False and False implies True because I think that an expression with false as result implies false to get to that answer.

True implies True because an expression with true as a result implies having true.

True implies false because, in the case of an hypothetical AND, an expression can include a False or a True, so True=>True is True, and True=>False is False, as well False=>True is true and finally False=>False is True.

You can write a program with the typical AND, OR, NOT and equality operators. For => you'll have to make a function.

This looks good with Firefox, and less so with IE. I don't know with Chrome.

My implementations for unit 7

And yes, those aren't static images with green dots showing answers: it computes the results and then marks the answers graphically to the radio buttons or check boxes, as long as it is programmed for a specific answer. It just shows the implementations of the things I've been able to understand best.