tree-search

Possible to simulate a simple CPU in prolog?

你。 提交于 2019-12-01 06:23:27
问题 My understanding is that a simple model of a CPU is a state machine. When I look at prolog, it appears to tree-search (or graph search) combinations, whilst stopping at constraints running until its goals are found. I've been told that you can simulate a simple CPU in prolog. Is it possible to represent a state machine model like a simple CPU in prolog? 回答1: Prolog is a Turing-complete language, so you can express arbitrary computations in it, including the simulation of a CPU. You can

What is the difference between graph search and tree search?

ⅰ亾dé卋堺 提交于 2019-11-27 10:02:05
What is the difference between graph search and tree search versions regarding DFS, A* searches in artificial intelligence ? Judging from the existing answers, there seems to be a lot of confusion about this concept. The Problem Is Always a Graph The distinction between tree search and graph search is not rooted in the fact whether the problem graph is a tree or a general graph. It is always assumed you're dealing with a general graph. The distinction lies in the traversal pattern that is used to search through the graph, which can be graph-shaped or tree-shaped. If you're dealing with a tree