Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. (a) Uncertainty
One problem with first-order logic and thus with the logical agent approach is that agents almost
never have access to the whole truth about their environment.
Some sentences can be ascertained directly from the agents precepts and others can be inferred
from current and previous percepts together with knowledge about the properties of environment.
r
There will be important questions to which the agent can’t find a categorical answer. The agent
ka
must therefore act under uncertainty
Uncertainty can also arises because of incompleteness and incorrectness in the agent’s
understanding of properties of the environment.
Uncertainty means that many of the simplifications that are possible with deductive interfaces
are no longer valid.
Uncertainty arises because of both laziness and ignorance. It is inescapable in complex,
dynamic or in-accessible world.
1. (b) Precision
an
It is the measure of spatial resolution with which the tool can be positioned within the work space
envelope.
Example The tool tip is positioned at position A and the next closest position that it can be
moved is B, then precision along that direction is the distance between, point A and B.
Accuracy
al
It is the measure of ability of robot to place the tool tip at an arbitrarily prescribed location in
work envelope.
Repeatability is always < accuracy.
Repeatability
dy
It is the measure of ability of the robot to position the tool tip in the same place repeatedly or the
ability of robot to do the same job again and again repeatedly and then come back to its original
position.
For Cartesian coordinate robot overall precision is uniform.
For Cartesian coordinate robot, cylindrical robot and SCARA robot vertical precision is uniform.
Vi
yk1
zk1 qk
k1 k
x
Link Diagram
Joint Diagram
k: Joint Angle
1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI 1
Vidyalankar : B.E. RAI
r
It is amount of translation along Xk to make Zk1 intersect with Zk.
For Revolute joint: QK is variable.
ka
For Prismatic joint : dk is variable.
4 Operations
1) K: Joint Angle Rot (k, ZK1)
Screw (dk, k,Zk1)
2) dk : Joint Distance Trans (dk, Zk1)
3) k : Link Twist Angle Rot (k, Xk)
4) qk : Link length Trans(dk, xk) Screw (qk, k, Xk)
an
Tkk1 = Screw (dk, Qk, Zk1)
Cosk Sink 0 : 0 1
Screw (qk, k, Xk)
0 0 :qk
Sink Cos 0 : 0 0 Cos k Sin k : 0
0 0 1 : dk 0 Sin Cos k : 0
0 0 0 : 1 0 0 0 :1
al
Cosk Sink.Cos k Sink.Sin k :qkCos
Sink Cosk.Cos k Cosk.Sin k : qkSin
0 Sin k Cos k : dk
0 0 0 : 1
dy
Home configuration values are the values of joint variable a reset or initial configuration.
If these values are multiple of /2 it is otherwise, Hard home configuration.
f3
ROLL
PITCH
f2
To specify tool orientation, a mobile tool coordinate frame M = {m1, m2, m3} is attached to the
tool and moves with the tool. Here m3 is aligned with the principal axis of the tool and points
away from the wrist. Next, m2 is parallel to the line followed by the fingertips of the tool as it
opens and closes. Finally, ml completes the right-handed tool coordinate frame M.
By convention, the yaw, pitch, and roll motions are performed in a specific order about a set of
fixed axes. Initially, the mobile tool frame M starts out coincident with a fixed wrist coordinate
frame F = {f1, f2, f3} attached at the end of the forearm. First the yaw motion is performed by
rotating the tool about wrist axis f2. Next, the pitch motion is performed by rotating the tool about
r
wrist axis f2. Finally, the roll motion is performed by rotating the tool about wrist axis f3. In each
case positive angles correspond to counterclockwise rotations as seen looking along the axis back
ka
toward the origin.
The order in which the yaw, pitch, and roll motions are performed is significant because it affects
the final orientation of the tool. For example, a yaw of /2 followed by a pitch of /2 yields a
different final tool orientation from the orientation produced by a pitch of /2 followed by a yaw
of /2. Thus, implicit in the YPR convention is the order of rotations summarized in Table 1.
an Table 1 : Yaw, Pitch, And Roll Motion
Operation Description Axis
1 Yaw f1
2 Pitch f2
3 Roll f3
An alternative way to specify the YPR motions is to instead perform the rotations in reverse order
al
about the axes of the mobile tool frame M rather than the fixed wrist frame F. That is, first a roll
motion is performed about m3, then a pitch motion is performed about m2, and finally a yaw
motion is performed about m1. This is equivalent to performing the rotations about the axes of the
fixed wrist frame F in the original YPR order, in the sense that the tool ends up at the same
orientation. For this reason, the YPR system is often referred to as the RPY system. A sequence
dy
of rotations about the mobile frame M axes is often easier to visualize, particularly when the
angles are not multiples of /2.
r
ka
Fig. 1 : A general model of learning agents
A learning agent is divided into four conceptual components i.e. learning element performance
element, problem generator, critic as shown in below. The learning element is responsible for
an
making improvement. The performance element is responsible for selecting external action. It
takes in percepts and decides on actions. The learning element takes some knowledge about the
learning element and some feedback on how the agent is doing, and to tell determine how the
performance element should be modified to do better in future. The design of learning element
depends on the design of the performance element. The critic is designed to tell the learning
element how well the agent is doing. The critic employ's fixed standard of performance.
Since the percepts do not provide indication of the agents success therefore the critic is necessary.
al
For example, a chess program may receive a percept indicating that it has check mated its
opponent, but it needs a performance standard to know that this is a good thing the percept itself
does not say so. It is important that the performance standard is a fixed measure that is outside the
agent; otherwise the agent could adjust its performance standards to meet its behavior. The last
component of the learning agent is the problem generator. Problem generator is responsible for
dy
suggestion action that will lead to new and informative experiences. The point is that if the
performance element had its way, it would keep doing the action that are best, given what it
knows. But if the agent is willing to explore a little, and do some perhaps suboptimal action in the
short run it might discover much better action for the long run?
Consider a example of the automated taxi:
a) The performance element consists of whatever collection of knowledge and procedures the
Vi
taxi has for selecting its driving action i.e. Turning, accelerating, braking, honking etc. The
taxi runs and drives, using this performance element.
b) The learning element formulate goals i.e. To learn better rules describing the effects of
braking and accelerating, to learn the geography of the area, to learn how the taxi bravest on
different conditions of the road the road is wet etc.
c) The critic observes the world and passes information along to the learning element.
For example, after the taxi makes a quick left turn across three lanes of traffic, the critic observes
shocking language used by other drivers, the learning element is able to formulate a rule saying
this was a bad action, and the performance element is modified by installing the new rule. The
problem generator gives suggestion for e.g. It tells which route is faster and better. The learning is
also responsible for improving the efficiency of the performance element. For example, when
asked to make a trip to a new location, the taxi driver may take some time to consult its map and
plan the best route. Next time a similar trip will be faster. This is called seed up learning.
4 1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI
Prelim Question Paper Solution
r
determined by the sequence of joints used for the first three axes. Six types of robot joints are
possible (Fu et al., 1987). However, only two basic types are commonly used in industrial robots,
ka
and they are listed in Table 1.
Revolute joints (R) exhibit rotary motion about an axis. They are the most common type of joint.
The next most common type is a prismatic joint (P), which exhibits sliding or linear motion
along an axis. The particular combination of revolute and prismatic joints for the three major axes
determines the geometry of the work envelope, as summarized in Table 2. The list in Table 2 is
not exhaustive, since there are many possibilities, but it is representative of the vast majority of
al
commercially available robots. As far as analysis of the motion of the arm is concerned, prismatic
joints tend to be simpler than revolute joints. Therefore the last column in Table 2, which
specifies the total number of revolute joints for the three major axes, is a rough indication of the
complexity of the arm.
dy
P = prismatic, R = revolute
1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI 5
Vidyalankar : B.E. RAI
P
Work Envelope
P Rectangular
r
Fig. 1 : Cartesian robot.
ka
BASE
Application: Material Handling
R
dy
BASE
Fig. 2 : Application: Limited
workspace- Pharmaceutical industries
3) Spherical Robot [RPP]
Vi
R P
Work Envelope
sphere
BASE
Fig. 3 : Spherical robot.
Application: Spray Painting
6 1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI
Prelim Question Paper Solution
If the second joint of a cylindrical-coordinate robot is replaced with a revolute joint (so that
the configuration is then RRP), this produces a spherical-coordinate robot. An example of a
spherical-coordinate robot is shown in Fig. 3. Here first revolute joint swings the arm back
and forth about a vertical base axis, while the second revolute joint pitches the arm up and
down about a horizontal shoulder axis. The prismatic joint moves the wrist radially in and
out. The work envelope generated in this case is the volume between two concentric spheres.
The spheres are typically truncated from above, below, and behind by limits on the ranges
travel of the joints.
r
ka
P
R
R
an
Application: Semiconductor Industry and IC
manufacturing / PCB assembly
Fig. 4 : SCARA robot
R
Vi
1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI 7
Vidyalankar : B.E. RAI
When the last remaining prismatic joint is replaced by a revolute joint (to yield the
configuration RRR), this produces an articulated-coordinate robot. An articulated-coordinate
robot is the dual of a Cartesian robot in the sense that all three of the major axes are revolute
rather than prismatic. The articulated-coordinate robot is the most anthropomorphic
configuration; that is, it most closely resembles the anatomy of the human arm. Articulated
robots are also caWed revolute robots. An example of an articulated-coordinate robot is
shown in Fig. 5. Here thef first revolute joint swings the robot back and forth about a vertical
base axis. The second joint pitches the arm up and down about a horizontal shoulder axis, and
the third joint pitches the forearm up and down about a horizontal elbow axis. These motions
create a complex work envelope, with a side-view cross section typically being crescent-
shaped.
r
The basic task for any probabilistic inference system is to compute the posterior. Probability
distribution for a set of query variables, given exact values for some evidence variables. In
ka
general, an agent gets values for evidence variables form its percepts and asks about the possible
values of other variables so that it can decided what action to take.
This is the combination of Inter causal and diagnostic inference. Belief network can also be
used for the following :
Making decisions based on probabilities in the network and on the agents utilities. Deciding
which additional evidences variables should be observed in order to gain useful information.
Performing sensitivity analysis to understand which aspects of the model have the Greatest
impact on the query variables. Explaining the results of probabilistic inference to the user.
Vi
4. (a) We can use the following prepositional symbols in above set of facts.
P : Rimi is Hungry
Q : Rimi is barks
R : Raja is angry
8 1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI
Prelim Question Paper Solution
To make matters worse, some rooms contain bottomless pits that will trap anyone who wanders
into these rooms (except for the wumpus, who is too bit to fall in. The justifying feature of the
r
wumpus world environment is the occasional heap of golds.
ka
Specifying the Environment
The Wumpus world is a grid of squares surrounded by walls; each square can contain agents and
objects. The agent always starts in the lower left corner, a square with label [1, l]. The agent's task
is to find the gold, return to [1, 1] and climb out of the cave.
To specify the agent's task specify its percepts, actions, and goals. In the Wumpus world the
following steps must be considered:
In the square containing the wumpus and in the directly adjacent square, which is not
diagonal, the agent will perceive a stench.
Vi
In the squares directly adjacent to a pit, the agent will perceive a breeze.
In the square where there is gold, the agent will perceive a glitter.
When an agent walks into a wall, it will perceive a bump.
When the wumpus is killed, it gives out a mournful scream that can be perceived anywhere in
the cave.
The percepts will be given to the agent in the form of five symbols; for example, if there is a
stench, a breeze, and a glitter but not bump and scream, the agent will receive the percept.
[Stench, Breeze, Glitter, None, None]. The agent cannot perceive its own location.
The agent uses Grab action to pick up an object in the same square as the agent. There are
actions to go forward, turn right by 90°, and turn left by 90°.The agent uses Shoot action to
fire an arrow in a straight line in the direction in which agent is facing. The arrow continues
until the wumpus is hit or killed or the wall is hit. Climb action is used to leave the cave
which is effective only when the agent is in the start square.
1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI 9
Vidyalankar : B.E. RAI
The agent dies if it enters a square containing a pit or live wumpus. It is safer to enter a
square with a dead Wumpus.
The agent’s goal is to find the gold and bring it back to the start as soon as possible without
being killed.
An agent does well in a single environment merely by memorizing the sequence of actions that
happen to work in that environment. To provide a real test specify a complete class of
environments, and insist that the agent does well over the whole class.
r
of ‘f’, return a function ‘h’ that approximates f. The function ‘h’ is called hypothesis.
ka
Consider an example of plane geometry.
an
Fig. : In (a) we have some example (input, output) pairs. In (b), (c), and (d) we
have three hypotheses for functions from which these examples could be drawn.
a) The (input,output) pairs are (x, y) points in the plane, where y = f(x), and the task is to find a
function h(x) that fits the points well.
al
b) In fig.(b) is a piece wise linear h function.
c) In fig. (c) it is a more complicated h function. Both functions agree with the example points,
but differ on the y values they assign to other x inputs.
d) In fig. (d) it have a function that apparently ignores one of the example points, but fits the
others with a simple function.
dy
A Bias is any preference for one hypothesis over another, beyond the consistency with the
examples. There are always a large number of possible consistent hypothesis so all learning
algorithms exhibit some bias. The agent could perform incremental learning & instead of
applying the learning algorithm to the entire set of examples each time a new prediction is
needed. The agent should update its old hypothesis whenever a new example arrives.
The agent might receive some feedback concerning the quality of the actions it chooses. The
design of learning algorithms for belief networks is also very important. In learning there is a
Vi
fundamental tradeoff between expressiveness which is the desired function representable in the
representation languages and efficiency which is the learning problem going to be tractable for a
given choice of representation language.
5. (b) PROLOG
Prolog is a general purpose logic programming language associated with A.I. and computational
linguistics. Prolog has its roots in first-order-logic a formal logic and unlike many other
programming languages. Prolog is declaration : the program logic is expressed in terms of
relations, represented as facts and rules to computation is initiated by running a query our there
relations.
Prolog was one of the first logic programming languages, and remains among the most popular
such languages today, with many free and commercial implementations available while initially
10 1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI
Prelim Question Paper Solution
aimed at natural language processing, the language has since the stretched for into other areas like
theorem processing, expert systems, games, automated answering systems, antologies and
sophisticated control systems, modern prolog environment support creating graphical user
interfaces as well as administrator and networked applications.
Features of Prolog
1. Stand alone Programs: With prolog we can compile stand – alone programs that will execute on a
machine that is not running turbo prolog. These stand-alone programs can be sold or distributed to
users without paying any royalties to its developer Borland International.
2. Trace Mode of Execution: We can use the trace mode with our program to watch it execute
a step at a time. In this mode, the program will begin to execute and then pause with a menu
at the bottom of the screen. We can then use the F10 key to execute the program one step at a
r
time.
3. Fail predicate for controlled execution : In prolog, forcing a rule to fail under certain
ka
conditions is a type of control and is essential to good programming failure can be forced in
any rule by using the built-in fail predicate. The fail forces backtracking in an attempt to
unify with another clause. Whenever this predicate is invoked, the goal being proved
immediately fails and backtracking is initiated.
4. Backtracking : The solution of compound goal proceeds from left to right. If any condition
in the chain fails, prolog backtracks to the previous condition, tries to prove it again with
another variable binding, and then moves forward again to see if the failed condition will
an
succeed with the new binding.
5. The Cut: The primary purpose of the cut is to prevent or block backtracking based on a
specified condition. This is to eliminate certain search paths in the problem space. The cut
acts like a fence where it is placed in the program. We cannot backtrack beyond the cut. In
some cases it serves a procedural function. The program will not work without it. In other
cases it serves a heuristic function. The program will work without it, but the cut eliminates
al
the need to test irrelevant paths and thus speeds up the execution.
6. Recursion: Recursion is a technique in which something is defined in terms of itself. In
prolog, recursion is the technique of using a clause to invoke a copy of itself. Recursion is
one of Prolog's most important execution control techniques. It is often used with the fail or
the cut predicate.
dy
7. Compound Objects: With turbo prolog, we can create an object that contains other objects.
The resulting structure is called a compound object. For example for addresses address
(name, street, city, state, zip). This entire address can then be treated as a single object in a
predicate.
8. String Operations : The string type is any sequence of characters enclosed in quotation
marks. Turbo prolog has several built-in predicates for string operations. Using the string
Vi
operations predicates, we can join, or concatenate, strings and find substrings. The same
predicates also serve useful functions for testing relationships between strings. The operations
are concat, frontstr, str_len, frontchar, fronttoken, isname, upper-lower.
9. Dynamic Databases : A prolog program is a collection of facts and rules about a particular
knowledge domain. The program really is a database. During program execution facts
obtained from the user during the consultation session that apply only to the current
consultation are stored in the dynamic database. These database predicates are then updated
using one of turbo prolog’s built-in database predicates.
10. File Operations : We can greatly expand the size of our programs by storing data on a disk /
file. Turbo prolog contains several built-in predicates for reading files and writing to files.
Openwrite, closefile, openread, openappend, openmodify, etc. are some of the predicates used
for the same.
1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI 11
Vidyalankar : B.E. RAI
11. Windows, Graphics and Sound : We can create a window for our program at any time by
using the makewindow predicate. Several additional window predicates are removewindow,
clearwindow, cursor (Row, Column), Window-attr (Attr), gotowindow (windowNo), etc.
Various graphics predicates are graphics, text, dot, line, pencolor, penup, pendown, penpos,
forward, back, etc.
12. Interface to other languages : A functional interface to other languages is provided,
allowing procedural language support to be added to any prolog system.
13. Integrated Editor : An integrated editor is provided, making program development,
compilation, and debugging very easy.
14. Modular Programming : Prolog allows modular programming. When developing a large
program, we can break the parts down into several programs or modules. Here, we must
r
define a project file and then compile the programs using the project directive.
15. Controlling Overflow : If we write a very large program, we may find that when we compile
ka
the program we overflow the computer memory available for the internal code array. In
prolog, we can add a code directive to increase the space available for this array.
/ * Simple Turbo Prolog Program * /
domains
disease, indication = symbol
predicates
Clauses
an
symptom (disease, indication)
r3: Approach vector
qn: Roll Angle
Formation of TCV from the ARM matrix
R11 R12 R13 P1
R P2
21 R 22 R 23
Tool
Arm Matrix = TBase
R 31 R 32 R 33 P3
0 0 0 1
r1 Normal Vector
r2 Sliding Vector
r3 Approach Vector
12 1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI
Prelim Question Paper Solution
r
2 2 2
exp n w 4 W5 W6
ka
q n n(w 24 W52 W62 )1/2
q1 BA 1
q EA 2
q 2
q3 VE d 3
al
q 4 TR 4
a1 a2
Elbow (2)1
dy
x x2
y2 VE (3)
y1 1 z2 d3
z
d1 x3
y3 3 Roll (4)
z d4
z0 y4
y0 4
x4 z
Vi
0 x0
Base (1)
1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI 13
Vidyalankar : B.E. RAI
r
q n n| W6 |
ka
(b) To obtain / Extract Vertical Extension (q3 = d3)
w3 = d1 q3 d4
q3 d1 d 4 w 3
W2 a 2s 2 c1 a1 a 2 c2 s1
W1 a1 a 2 c 2 a 2s 2 C1
W a s
a1 a 2 c 2 S1
2 2 2
(a s )w (a a c )w
S1 2 2 1 2 1 2 2 2 2
(a1 a 2 c2 ) (a 2s 2 ) determinant
(a a c )w (a 2s 2 )w 2
C1 1 2 2 21
(a1 a 2 c 2 ) (a 2s 2 ) 2 determinant
S1 (a s )w (a1 a 2 c 2 )w 2
q1 arctan 2 2 1
C2 (a1 a 2 c 2 )w1 (a 2s 2 )w 2
14 1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI
Prelim Question Paper Solution
r
Spray painting and finishing 12.4
Mechanical assembly 6.2
ka
Electronic assembly 4.8
Material removal 4.5
Inspection and testing 2.9
Water jet cutting 2.7
Other 11.1
Traditional applications of material handling, welding, and spray painting and finishing continue
to dominate. The market share of assembly applications, both mechanical and electrical, has
an
grown steadily over the past decade, and there is clearly potential for more applications in this
area. However, the general assembly problem has turned out to be quite challenging. The
assembly process can be modeled as a sequence of carefully planned collisions between the
manipulator and the objects in its workspace. The delicate motion control that is required for
assembly tasks dictates the use of feedback from external sensors. This allows the robot to adapt
its motion in order to compensate for part tolerances and other uncertainties in the environment.
Often customized fixtures and jigs are used to secure parts and present them to the robot at known
al
positions and orientations (Boyes, 1985). This has the effect of reducirg uncertainty, but it can be
an expensive approach.
1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI 15
Vidyalankar : B.E. RAI
desirable—for example, being at the passenger's destination. The agent program can combine this
with information about the results of possible actions (the same information as was used to update
internal state in the reflex agent) in order to choose actions that achieve the goal. Figure 13 shows
the goat-based agent's structure.
Agent Sensors
State
What the world is
How the world evolves like now
Environment
What the world is
What my actions do
like now
r
What action I
ka
Goals
should do now
Actuators
Notice that decision making of this kind is fundamentally different from the condition-action
al
rules described earlier, in that it involves consideration of the future—both "What will happen if I
do such-and-such?" and "Will that make me happy?" In the reflex agent designs, this information
is not explicitly represented, because the built-in rules map directly from percepts to actions. The
reflex agent brakes when it sees brake lights. A goal-based agent, in principle, could reason that if
the car in front has its brake lights on, it will slow down. Given the way the world usually
dy
evolves, the only action that will achieve the goal of not hitting other cars is to brake.
Although the goal-based agent appears less efficient, it is more flexible because the knowledge
that supports its decisions is represented explicitly and can be modified. If it starts to rain, the
agent can update its knowledge of how effectively its brakes will operate; this will automatically
cause all of the relevant behaviors to be altered to suit the new conditions. For the reflex agent, on
the other hand, we would have to rewrite many condition-action rules. The goal-based agent's
behavior can easily be changed to go to a different location. The reflex agent's rules for when to
Vi
turn and when to go straight will work only for a single destination; they must all be replaced to
go somewhere new.
Although efficient special-purpose algorithms exist for this problem and the whole n-queens
family, it remains an interesting test problem for search algorithms. There are two main kinds of
formulation. The incremental formulation involves placing queens one by one, whereas the
complete-state formulation starts with all 8 queens on the board and moves them around. In either
16 1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI
Prelim Question Paper Solution
case, the path cost is of no interest because only the final state counts; algorithms are thus
compared only on search cost. Thus, we have the following goal test and path cost:
Goal test: 8 queens on board, none attacked.
Path cost: zero.
r
ka
Fig. 1 : Almost a solution to the 8-queens problem
There are also different possible states and operators. Consider the following simple-minded
formulation:
States: any arrangement of 0 to 8 queens on board.
an
Operators: add a queen to any square.
In this formulation, we have 64 possible sequences to investigate. A more sensible choice would
use the fact that placing a queen where it is already attacked cannot work, because subsequent
placings of other queens will not undo the attack. So we might try the following:
States: arrangements of 0 to 8 queens with none attacked.
Operators: place a queen in the left-most empty column such that it is not attacked by any
al
other queen.
It is easy to see that the actions given can generate only states with no attacks: but sometimes no
actions will be possible. For example, after making the first seven choices (left-to-right) in the
figure, there is no action available in this formulation. The search process must try another
dy
choice. A quick calculation shows that there are only 2057 possible sequences to investigate. The
right formulation makes a big difference to the size of the search space. Similar considerations
apply for a complete-state formulation. For example, we could set the problem up as follows:
States: arrangements of 8 queens, one in each column.
Operators: move any attacked queen to another square in the same column-.
This formulation would allow the algorithm to find a solution eventually, but it would be better to
Vi
1113/Engg/BE/Pre Pap/2013/CMPN/Soln/RAI 17