0% found this document useful (0 votes)
58 views3 pages

Ai Lab Report

Artificial intelligence lab report.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views3 pages

Ai Lab Report

Artificial intelligence lab report.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Green University of Bangladesh

Department of Computer Science and Engineering (CSE)


Faculty of Sciences and Engineering
Semester: (Spring, Year:2024), B.Sc. in CSE (Day)

Lab Report NO #03

Course Title: Artificial Intelligence Lab


Course Code: CSE 316 Section: 213 D2

Lab Experiment Name: IDDS problem.

Name ID

Mahmudul Hasan 213002198

Lab Date : 14th May 2024


Submission Date : 4th June 2024
Course Teacher’s Name : Md Naimul Pathan

Lab Report Status


Marks: ………………………………… Signature:.....................
Comments:.............................................. Date:..............................
TITLE OF THE LAB REPORT EXPERIMENT
IDDS problem
OBJECTIVES/AIM
• To attain knowledge on the Collab and how it works.
• To gather knowledge on IDDS for beginners..
• To implement the basics of Python.

PROCEDURE / ANALYSIS / DESIGN Else:

• The Incremental Differential Dynamic Programming with Switching (IDDS) problem is a variant of the classical
Differential Dynamic Programming (DDP) method that addresses continuous-time optimal control problems
involving system switches or mode changes
• Define the continuous-time optimal control problem with system switches or mode changes.
• Discretize the continuous-time problem into a sequence of discrete-time subproblems.
• Iterate between the forward and backward passes, control and mode sequence updates until convergence is
achieved or a maximum number of iterations is reached.
IMPLEMENTATION :

from collections import defaultdict

class Graph:

def __init__(self,vertices):

# No. of vertices
self.V = vertices

self.graph = defaultdict(list)

# function to add an edge to graph


def addEdge(self,u,v):
self.graph[u].append(v)

def DLS(self,src,target,maxDepth):

if src == target : return True

if maxDepth <= 0 : return False

for i in self.graph[src]:
if(self.DLS(i,target,maxDepth-1)):
return True
return False

def IDDFS(self,src, target, maxDepth):

for i in range(maxDepth):
if (self.DLS(src, target, i)):
return True
return False

g = Graph (7);
g.addEdge(0, 1)
g.addEdge(0, 2)
g.addEdge(1, 3)
g.addEdge(1, 4)
g.addEdge(2, 5)
g.addEdge(2, 6)

target = 6; maxDepth = 3; src = 0

if g.IDDFS(src, target, maxDepth) == True:


print ("Target is reachable from source " +
"within max depth")
else :
print ("Target is NOT reachable from source " +
"within max depth")

Result:

ANALYSIS AND DISCUSSION:

• The IDDS problem addresses optimal control problems with switching dynamics, where the system can
transition between different modes or regimes. This introduces addional complexity compared to standard
optimal control problems.

SUMMARY : IDDS has applications in various domains, including robotics, aerospace, finance, and process control,
where systems exhibit switching dynamics or mode changes.

You might also like