Ai Lab Report
Ai Lab Report
Name ID
• 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 :
class Graph:
def __init__(self,vertices):
# No. of vertices
self.V = vertices
self.graph = defaultdict(list)
def DLS(self,src,target,maxDepth):
for i in self.graph[src]:
if(self.DLS(i,target,maxDepth-1)):
return True
return False
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)
Result:
• 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.