Skip to content

By using of utility approach for path finding in AI, the script prints the optimal states to follow with arrows UP, DOWN, RIGHT or LEFT

License

Notifications You must be signed in to change notification settings

yesyigitcan/AI-Utility-Based-Markov-Decision-Process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Utility-Based-Markov-Decision-Process

By using of utility approach for path finding in AI, the script prints the optimal states to follow with arrows UP, DOWN, RIGHT or LEFT.

WALL is wall (you can type any word less than 10 length instead of |), . is empty space, +1 positive reward and -1 negative reward

Map Matrix

[

        [".",   ".",    ".",    ".",    "+1"],
        
        [".",   ".",    ".",    ".",    "-1"],
        
        [".",   "|",    ".",    ".",    "."],
        
        [".",   ".",    ".",    ".",    "."]

]

getUtilityCalculatedMap()

Output is like for given map matrix

printArrowMap()

RIGHT RIGHT RIGHT RIGHT +1

RIGHT RIGHT UP UP -1

UP | UP UP DOWN

UP RIGHT UP UP DOWN

printUtilityMap()

0.3210 0.4388 0.5860 0.7700 1.0000

0.3251 0.4038 0.4874 0.4860 -1.0000

0.2301 0.0000 0.3955 0.3558 -0.0300

0.1760 0.2193 0.3116 0.2516 -0.0300

Map Trip

Map trip is just a console simulation of moving agent without learning to see the time of travel depending on full randomness

About

By using of utility approach for path finding in AI, the script prints the optimal states to follow with arrows UP, DOWN, RIGHT or LEFT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages