Objective: - Theory:-: Artificial Intelligence (Cs-1771)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

ARTIFICIAL INTELLIGENCE(CS-1771)

Objective:-​ ​Write a program to implement Tic-Tac-toe game problem.


Theory:-
The tic-tac-toe game is played on a 3x3 grid the game is played by two players, who take turns.
The first player marks moves with a circle, the second with a cross. The player who has formed
a horizontal, vertical, or diag-onal sequence of three marks wins. Your program should draw the
game board, ask the user for the coordinates of the next mark, change the players after every
successful move, and pronounce the winner. every successful move, and pronounce the
winner.

Program:-
#include <stdio.h>

#include <conio.h>

char square[10] = { 'o', '1', '2', '3', '4', '5', '6', '7', '8', '9' };

int checkwin();

void board();

int main()

int player = 1, i, choice;

char mark;

do

board();

player = (player % 2) ? 1 : 2;

printf("Player %d, enter a number: ", player);

scanf("%d", &choice);

mark = (player == 1) ? 'X' : 'O';

if (choice == 1 && square[1] == '1')

square[1] = mark;

else if (choice == 2 && square[2] == '2')

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

square[2] = mark;

else if (choice == 3 && square[3] == '3')

square[3] = mark;

else if (choice == 4 && square[4] == '4')

square[4] = mark;

else if (choice == 5 && square[5] == '5')

square[5] = mark;

else if (choice == 6 && square[6] == '6')

square[6] = mark;

else if (choice == 7 && square[7] == '7')

square[7] = mark;

else if (choice == 8 && square[8] == '8')

square[8] = mark;

else if (choice == 9 && square[9] == '9')

square[9] = mark;

else

printf("Invalid mo”);

player--;

getch();

i = checkwin();

player++;

}while (i == - 1);

board();

if (i == 1)

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

printf("==>\aPlayer %d win ", --player);

else

printf("==>\aGame draw");

getch();

return 0;

int checkwin()

if (square[1] == square[2] && square[2] == square[3])

return 1;

else if (square[4] == square[5] && square[5] == square[6])

return 1;

else if (square[7] == square[8] && square[8] == square[9])

return 1;

else if (square[1] == square[4] && square[4] == square[7])

return 1;

else if (square[2] == square[5] && square[5] == square[8])

return 1;

else if (square[3] == square[6] && square[6] == square[9])

return 1;

else if (square[1] == square[5] && square[5] == square[9])

return 1;

else if (square[3] == square[5] && square[5] == square[7])

return 1;

else if (square[1] != '1' && square[2] != '2' && square[3] != '3' &&

square[4] != '4' && square[5] != '5' && square[6] != '6' && square[7]

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

!= '7' && square[8] != '8' && square[9] != '9')

return 0;

else

return - 1;

void board()

system("cls");

printf("\n\n\tTic Tac Toe\n\n");

printf("Player 1 (X) - Player 2 (O)\n\n\n");

printf(" | | \n");

printf(" %c | %c | %c \n", square[1], square[2], square[3]);

printf("_____|_____|_____\n");

printf(" | | \n");

printf(" %c | %c | %c \n", square[4], square[5], square[6]);

printf("_____|_____|_____\n");

printf(" | | \n");

printf(" %c | %c | %c \n", square[7], square[8], square[9]);

printf(" | | \n\n");

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

Objective:- ​Write a program to implement BFS(for 8 puzzle problem on water Jug problem or
any AI search problem).

Theory:-
You are given a m litre jug and a n litre jug . Both the jugs are initially empty. The jugs don’t
have markings to allow measuring smaller quantities. You have to use the jugs to measure d
litres of water where d is less than n.

(X, Y) corresponds to a state where X refers to amount of water in Jug1 and Y refers to amount
of water in Jug2

Determine the path from initial state (xi, yi) to final state (xf, yf), where (xi, yi) is (0, 0) which
indicates both Jugs are initially empty and (xf, yf) indicates a state which could be (0, d) or (d,
0).

Program:-
#include <bits/stdc++.h>

#define pii pair<int, int>

#define mp make_pair

using namespace std;

void BFS(int a, int b, int target)

// Map is used to store the states, every

// state is hashed to binary value to

// indicate either that state is visited

// before or not

map<pii, int> m;

bool isSolvable = false;

vector<pii> path;

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

queue<pii> q; // queue to maintain states

q.push({ 0, 0 }); // Initialing with initial state

while (!q.empty()) {

pii u = q.front(); // current state

q.pop(); // pop off used state

// if this state is already visited

if (m[{ u.first, u.second }] == 1)

continue;

// doesn't met jug constraints

if ((u.first > a || u.second > b ||

u.first < 0 || u.second < 0))

continue;

// filling the vector for constructing

// the solution path

path.push_back({ u.first, u.second });

// marking current state as visited

m[{ u.first, u.second }] = 1;

// if we reach solution state, put ans=1

if (u.first == target || u.second == target) {

isSolvable = true;

if (u.first == target) {

if (u.second != 0)

// fill final state

path.push_back({ u.first, 0 });

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

else {

if (u.first != 0)

// fill final state

path.push_back({ 0, u.second });

// print the solution path

int sz = path.size();

for (int i = 0; i < sz; i++)

cout << "(" << path[i].first

<< ", " << path[i].second << ")\n";

break;

q.push({ u.first, b }); // fill Jug2

q.push({ a, u.second }); // fill Jug1

for (int ap = 0; ap <= max(a, b); ap++) {

// pour amount ap from Jug2 to Jug1

int c = u.first + ap;

int d = u.second - ap;

// check if this state is possible or not

if (c == a || (d == 0 && d >= 0))

q.push({ c, d });

// Pour amount ap from Jug 1 to Jug2

c = u.first - ap;

d = u.second + ap;

// check if this state is possible or not

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

if ((c == 0 && c >= 0) || d == b)

q.push({ c, d });

q.push({ a, 0 }); // Empty Jug2

q.push({ 0, b }); // Empty Jug1

if (!isSolvable)

cout << "No solution";

// Driver code

int main()

{ int Jug1 = 4, Jug2 = 3, target = 2;

cout << "Path from initial state "

"to solution state :\n";

BFS(Jug1, Jug2, target);

return 0;

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

Objective:- ​Write a program to implement A*algorithm.


Theory:-
A* Search algorithm is one of the best and popular technique used in path-finding and graph
traversals.

Program:-
#include <stdlib.h>

#include <stdio.h>

#include <string.h>

#include <float.h>

/* and not not_eq */

#include <iso646.h>

/* add -lm to command line to compile with this header */

#include <math.h>

#define map_size_rows 10

#define map_size_cols 10

char map[map_size_rows][map_size_cols] = {

{1, 1, 1, 1, 1, 1, 1, 1, 1, 1},

{1, 0, 0, 0, 0, 0, 0, 0, 0, 1},

{1, 0, 0, 0, 0, 0, 0, 0, 0, 1},

{1, 0, 0, 0, 0, 1, 1, 1, 0, 1},

{1, 0, 0, 1, 0, 0, 0, 1, 0, 1},

{1, 0, 0, 1, 0, 0, 0, 1, 0, 1},

{1, 0, 0, 1, 1, 1, 1, 1, 0, 1},

{1, 0, 0, 0, 0, 0, 0, 0, 0, 1},

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

{1, 0, 0, 0, 0, 0, 0, 0, 0, 1},

{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}

};

/* description of graph node */

struct stop {

double col, row;

/* array of indexes of routes from this stop to neighbours in array of all routes */

int * n;

int n_len;

double f, g, h;

int from;

};

int ind[map_size_rows][map_size_cols] = {

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1},

{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}

};

route between two nodes */

struct route {

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

/* route has only one direction! */

int x; /* index of stop in array of all stops of src of this route */

int y; /* intex of stop in array of all stops od dst of this route */

double d;

};

int main() {

int i, j, k, l, b, found;

int p_len = 0;

int * path = NULL;

int c_len = 0;

int * closed = NULL;

int o_len = 1;

int * open = (int*)calloc(o_len, sizeof(int));

double min, tempg;

int s;

int e;

int current;

int s_len = 0;

struct stop * stops = NULL;

int r_len = 0;

struct route * routes = NULL;

for (i = 1; i < map_size_rows - 1; i++) {

for (j = 1; j < map_size_cols - 1; j++) {

if (!map[i][j]) {

++s_len;

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

stops = (struct stop *)realloc(stops, s_len * sizeof(struct stop));

int t = s_len - 1;

stops[t].col = j;

stops[t].row = i;

stops[t].from = -1;

stops[t].g = DBL_MAX;

stops[t].n_len = 0;

stops[t].n = NULL;

ind[i][j] = t;

/* index of start stop */

s = 0;

/* index of finish stop */

e = s_len - 1;

for (i = 0; i < s_len; i++) {

stops[i].h = sqrt(pow(stops[e].row - stops[i].row, 2) + pow(stops[e].col - stops[i].col, 2));

for (i = 1; i < map_size_rows - 1; i++) {

for (j = 1; j < map_size_cols - 1; j++) {

if (ind[i][j] >= 0) {

for (k = i - 1; k <= i + 1; k++) {

for (l = j - 1; l <= j + 1; l++) {

if ((k == i) and (l == j)) {

continue;

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

if (ind[k][l] >= 0) {

++r_len;

routes = (struct route *)realloc(routes, r_len * sizeof(struct route));

int t = r_len - 1;

routes[t].x = ind[i][j];

routes[t].y = ind[k][l];

routes[t].d = sqrt(pow(stops[routes[t].y].row - stops[routes[t].x].row, 2) +


pow(stops[routes[t].y].col - stops[routes[t].x].col, 2));

++stops[routes[t].x].n_len;

stops[routes[t].x].n = (int*)realloc(stops[routes[t].x].n, stops[routes[t].x].n_len *


sizeof(int));

stops[routes[t].x].n[stops[routes[t].x].n_len - 1] = t;

open[0] = s;

stops[s].g = 0;

stops[s].f = stops[s].g + stops[s].h;

found = 0;

while (o_len and not found) {

min = DBL_MAX;

for (i = 0; i < o_len; i++) {

if (stops[open[i]].f < min) {

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

current = open[i];

min = stops[open[i]].f;

if (current == e) {

found = 1;

++p_len;

path = (int*)realloc(path, p_len * sizeof(int));

path[p_len - 1] = current;

while (stops[current].from >= 0) {

current = stops[current].from;

++p_len;

path = (int*)realloc(path, p_len * sizeof(int));

path[p_len - 1] = current;

for (i = 0; i < o_len; i++) {

if (open[i] == current) {

if (i not_eq (o_len - 1)) {

for (j = i; j < (o_len - 1); j++) {

open[j] = open[j + 1];

--o_len;

open = (int*)realloc(open, o_len * sizeof(int));

break;

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

++c_len;

closed = (int*)realloc(closed, c_len * sizeof(int));

closed[c_len - 1] = current;

for (i = 0; i < stops[current].n_len; i++) {

b = 0;

for (j = 0; j < c_len; j++) {

if (routes[stops[current].n[i]].y == closed[j]) {

b = 1;

if (b) {

continue;

tempg = stops[current].g + routes[stops[current].n[i]].d;

b = 1;

if (o_len > 0) {

for (j = 0; j < o_len; j++) {

if (routes[stops[current].n[i]].y == open[j]) {

b = 0;

if (b or (tempg < stops[routes[stops[current].n[i]].y].g)) {

stops[routes[stops[current].n[i]].y].from = current;

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

stops[routes[stops[current].n[i]].y].g = tempg;

stops[routes[stops[current].n[i]].y].f = stops[routes[stops[current].n[i]].y].g +
stops[routes[stops[current].n[i]].y].h;

if (b) {

++o_len;

open = (int*)realloc(open, o_len * sizeof(int));

open[o_len - 1] = routes[stops[current].n[i]].y;

for (i = 0; i < map_size_rows; i++) {

for (j = 0; j < map_size_cols; j++) {

if (map[i][j]) {

putchar(0xdb);

} else {

b = 0;

for (k = 0; k < p_len; k++) {

if (ind[i][j] == path[k]) {

++b;

if (b) {

putchar('x');

} else {

putchar('.');

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

putchar('\n');

if (not found) {

puts("IMPOSSIBLE");

} else {

printf("path cost is %d:\n", p_len);

for (i = p_len - 1; i >= 0; i--) {

printf("(%1.0f, %1.0f)\n", stops[path[i]].col, stops[path[i]].row);

for (i = 0; i < s_len; ++i) {

free(stops[i].n);

free(stops);

free(routes);

free(path);

free(open);

free(closed);

return 0;

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

Objective :- ​ ​Write a program to solve N-Queens problem using Prolog.


Theory:-​Problem is often generalized to N queens – place N queens on an N × N board so that
no two attack each other (problem has no solution for N < 4). Any solution to the N queens
problem will have a queen in each row and a queen in each column. I will use prolog to explain
this problem, solutions can be specified as a permutation of the list of numbers 1 to N. The first
element in the list is the row number of the queen in the first column, second element in the
list is the row number of the queen in the second column and so on …

Program:-
% queens(+N,-Queens): Queens is a solution to the N-queens problem

queens(N,Qs) :-

range(1,N,Us),

queens(Us,[],Qs).

% queens(+Unplaced,?Placed,?Queens)

queens([],Qs,Qs).

queens(Us,Ps,Qs) :-

select(Q,Us,Us1),

\+ attack(Q,Ps),

queens(Us1,[Q|Ps],Qs).

% range(+I,+J,-Ns): Ns is the list of integers between I and J inclusive

range(J,J,[J]).

range(I,J,[I|Ns]) :-

I < J, I1 is I + 1, range(I1,J,Ns).

% attack(+Q,+Qs): queen in row Q attacks one or more of the queens in

attack(Q,Qs) :- attack(Q,1,Qs).

attack(X,N,[Y|_]) :- X is Y + N.

attack(X,N,[Y|_]) :- X is Y - N.

attack(X,N,[_|Ys]) :-

N1 is N + 1, attack(X,N1,Ys).

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

Objective :- ​ ​Write a program to solve 8-Queens problem using Prolog.


Theory:-
The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so
that no two queens threaten each other; thus, a solution requires that no two queens share the
same row, column, or diagonal.

Program:-
DOMAINS

cell=c(integer,integer)

list=cell*

int_list=integer*

PREDICATES

solution(list)

member(integer,int_list)

nonattack(cell,list)

CLAUSES

solution([]).

solution([c(X,Y)|Others]):-

solution(Others),

member(Y,[1,2,3,4,5,6,7,8]),

nonattack(c(X,Y),Others).

nonattack(_,[]).

nonattack(c(X,Y),[c(X1,Y1)|Others]):-

Y<>Y1,

Y1-Y<>X1-X,

Y1-Y<>X-X1,

nonattack(c(X,Y),Others).

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

member(X,[X|_]).

member(X,[_|Z]):-

member(X,Z).

GOAL

solution([c(1,A),c(2,B),c(3,C),c(4,D),c(5,E),c(6,F),c(7,G),c(8,H)]).

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

Objective:-​ Write a program to solve travelling salesman problem using prolog.


Theory:-​ ​Given a set of cities and distance between every pair of cities, the problem is to find
the shortest possible route that visits every city exactly once and returns back to the starting
point.

Program:-
domains

/* will allow us cooperate with better names, for me this is like #typedef in C++ */

town = symbol

distance = unsigned

rib = r(town,town,distance)

tlist = town*

rlist = rib*

predicates

nondeterm way(town,town,rlist,distance)

nondeterm route(town,town,rlist,tlist,distance)

nondeterm route1(town,tlist,rlist,tlist,distance)

nondeterm ribsmember(rib,rlist)

nondeterm townsmember(town,tlist)

nondeterm tsp(town,town,tlist,rlist,tlist,distance)

nondeterm ham(town,town,tlist,rlist,tlist,distance)

nondeterm shorterRouteExists(town,town,tlist,rlist,distance)

nondeterm alltown(tlist,tlist)

nondeterm write_list(tlist)

clauses

write_list([]).

write_list([H|T]):-

write(H,‘ ‘),

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

write_list(T).

/* Is true if town X is in list of towns… */

townsmember(X,[X|_]).

townsmember(X,[_|L]):-

townsmember(X,L).

/* Is true if rib X is in list of ribs… */

ribsmember(r(X,Y,D),[r(X,Y,D)|_]).

ribsmember(X,[_|L]):-

ribsmember(X,L).

/* Is true if Route consists of all Towns presented in second argument */

alltown(_,[]).

alltown(Route,[H|T]):-

townsmember(H,Route),

alltown(Route,T).

/* Is true if there is a way from Town1 to Town2, and also return distance between them */

way(Town1,Town2,Ways,OutWayDistance):-

ribsmember(r(Town1,Town2,D),Ways),

OutWayDistance = D.

%/*

/* If next is uncommented then we are using non-oriented graph*/

way(Town1,Town2,Ways,OutWayDistance):-

ribsmember(r(Town2,Town1,D),Ways), /*switching direction here…*/

OutWayDistance = D.

%*/

/* Is true if we could build route from Town1 to Town2 */

route(Town1,Town2,Ways,OutRoute,OutDistance):-

route1(Town1,[Town2],Ways,OutRoute,T1T2Distance),

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

%SWITCH HERE

way(Town2,Town1,Ways,LasDist), /* If you want find shortest way comment this line*/

OutDistance = T1T2Distance + LasDist. /* And make this: OutDistance = T1T2Distance.*/

route1(Town1,[Town1|Route1],_,[Town1|Route1],OutDistance):-

OutDistance = 0.

route1(Town1,[Town2|PassedRoute],Ways,OutRoute,OutDistance):-

way(TownX,Town2,Ways,WayDistance),

not(townsmember(TownX,PassedRoute)),

route1(Town1,[TownX,Town2|PassedRoute],Ways,OutRoute,CompletingRoadDistance),

OutDistance = CompletingRoadDistance + WayDistance.

shorterRouteExists(Town1,Town2,Towns,Ways,Distance):-

ham(Town1,Town2,Towns,Ways,_,Other),

Other < Distance.

/* calling tsp(a,a,…. picks any one connected to a town and calls another tsp*/

tsp(Town1,Town1,Towns,Ways,BestRoute,MinDistance):-

way(OtherTown,Town1,Ways,_),

tsp(Town1,OtherTown,Towns,Ways,BestRoute,MinDistance).

/*Travelling Salesman Problem is Hammilton way which is the shortes of other ones.*/

tsp(Town1,Town2,Towns,Ways,BestRoute,MinDistance):-

ham(Town1,Town2,Towns,Ways,Route,Distance),

not(shorterRouteExists(Town1,Town2,Towns,Ways,Distance)),

BestRoute = Route,

MinDistance = Distance.

/*Hammilton route from Town1 to Town2 assuming that Town2->Town1 way exists.*/

ham(Town1,Town2,Towns,Ways,Route,Distance):-

route(Town1,Town2,Ways,Route,Distance),

%SWITCH HERE

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

alltown(Route,Towns), % if you want simple road without including all towns you could uncomment
this line

write_list(Route),

write(” tD = “,Distance,“n“).

% fail.

Goal;

/* EXAMPLE 2 */

AllTowns = [a,b,c,d,e],

AllWays = [r(a,c,1),r(a,b,6),r(a,e,5),r(a,d,8),r(c,b,2),r(c,d,7),r(c,e,10),r(b,d,3),r(b,e,9),r(d,e,4)],

tsp(a,a,AllTowns,AllWays,Route,Distance),

%SWITCH HERE

% tsp(a,b,AllTowns,AllWays,Route,Distance),

write(“Finally:n“),

write_list(Route),

write(” tMIN_D = “,Distance,“n“).

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

QUESTION:- Write the conceptual dependency for the following statements.

(a):- John gives Marry a Book. (b):- john gave Marry the book yesterday.

Conceptual Dependency originally developed to represent knowledge acquired from natural language
input.

The goals of this theory are:

• To help in the drawing of inference from sentences.

• To be independent of the words used in the original input.

• That is to say: For any 2 (or more) sentences that are identical in meaning there should be only
one representation of that meaning.

CD provides:

• a structure into which nodes representing information can be placed

• a specific set of primitives

• at a given level of granularity.

Consider the example:

John gives Mary a book

For Example: John gave Mary the book yesterday

Now let us consider a more complex sentence: Since smoking can kill you, I stopped Lets look at how we
represent the inference that smoking can kill:

• Use the notion of one to apply the knowledge to.

• Use the primitive act of INGESTing smoke from a cigarette to one.

• Killing is a transition from being alive to dead. We use triple arrows to indicate a transition from
one state to another.

• Have a conditional, c causality link. The triple arrow indicates dependency of one concept on
another.

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

• Arrows indicate the direction of dependency. Letters above indicate certain relationships:

o-- object.

R-- recipient-donor.

I-- instrument e.g. eat with a spoon.

D-- destination e.g. going home.

• Double arrows ( ) indicate two-way links between the actor (PP) and action (ACT).

• The actions are built from the set of primitive acts (see above).

o These can be modified by tense etc.

The use of tense and mood in describing events is extremely important and schank introduced the
following modifiers:

P -- past

f-- future

t-- transition

k-- continuing

?-- interrogative

/-- negative

delta-- timeless

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

QUESTION:- Describe major subfields and paradigms of AI.


AI now consists many sub-fields, using a variety of techniques,

such as: Neural Networks – e.g. brain modelling, time series prediction, classification Evolutionary
Computation – e.g. genetic algorithms,genetic programming Vision – e.g. object recognition, image
understanding Robotics – e.g. intelligent control, autonomous exploration Expert Systems – e.g. decision
support systems, teaching systems Speech Processing– e.g. speech recognition and production Natural
Language Processing – e.g. machine translation Planning – e.g. scheduling, game playing Machine
Learning – e.g. decision tree learning, version space learning.

QUESTION:- What are major challenges in the field of AI?

Building trust
AI is all related to science and algorithms, which lies on the technical side. People who are completely
unaware of these algorithms and technology that lies behind the working of Artificial intelligence find it
difficult to understand its functioning.

Here is how artificial intelligence can face trust issues with humans, in spite of its ability to cut down on
tasks. It is a basic human psychology that we often neglect something that we don’t understand. We as
humans tend to stay away from anything complicated.

AI human interface
The challenge here is the shortage of data science skills within humans to get maximum output from
artificial intelligence. As for the businesses, there is a shortage of advanced skills. Business owners need
to train their professionals to be able to leverage the benefits of this technology.

Statistics reveal that 55% of survey respondents felt the biggest challenge was the changing scope of
human jobs when everything will be automated.

Investment
Another challenge of artificial intelligence is that not all business owners or managers are willing to
invest in it. The funds required to set up and implement Artificial Intelligence is very high, thus not every
business owner or organization can invest in it or can try it for their own business.

Software malfunction
No technology or human is perfect. In case of software or hardware crashes, it is difficult to put a finger
on what went wrong. On the other hand, tasks performed by humans can be traced.

However, with machines and inbuilt algorithms in the picture, it is difficult to blame someone or find the
cause of a software/hardware crash. A recent example of this is the self-driving cars that took the life of
a pedestrian.

0108CS161023JAY KUMAR LALWANI


ARTIFICIAL INTELLIGENCE(CS-1771)

AI can’t replace every task


Ever since AI made its way into our lives, we have a notion that all tasks, minute or a gigantic, can be
managed by artificial intelligence. However, this can be true to a certain extent. But not all the tasks can
be undertaken by AI.

AI is more like a tool that helps increase the productivity of a task. It has the ability to replace all the
worldly tasks with machines and lets you do more productive tasks with your time. This is a tool that
strengthens and boost the performance and efficiency of an average worker.

Higher expectations
AI could have serious issues with the expectations of the people around. People, in general, don’t have a
detailed understanding of how AI works and hence they have extremely high expectations; some of
which are not even possible.

Humans have a tendency to expect high from something that is trending and the outputs from it are also
going to be excellent. However, like any other technology, there are certain limitations associated with
AI.

0108CS161023JAY KUMAR LALWANI

You might also like