22.02.2013 Views

Temas de “Programación lógica e I.A.”

Temas de “Programación lógica e I.A.”

Temas de “Programación lógica e I.A.”

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

86 Capítulo 4. Resolución <strong>de</strong> problemas <strong>de</strong> espacios <strong>de</strong> estados<br />

PD Tema 4: Resolución <strong>de</strong> problemas <strong>de</strong> espacios <strong>de</strong> estados<br />

Procedimientos <strong>de</strong> búsqueda en espacios <strong>de</strong> estados<br />

Búsqueda en profundidad con ciclos<br />

Enunciado <strong>de</strong>l problema <strong>de</strong> grafo con ciclos<br />

a<br />

/ \<br />

b c<br />

/ \ / \<br />

d e f g<br />

// / \ \<br />

h i j k<br />

◮ Estado inicial: a<br />

◮ Estados finales: f y j<br />

◮ Nota: el arco entre d y h es bidireccional<br />

PD Tema 4: Resolución <strong>de</strong> problemas <strong>de</strong> espacios <strong>de</strong> estados<br />

Procedimientos <strong>de</strong> búsqueda en espacios <strong>de</strong> estados<br />

Búsqueda en profundidad con ciclos<br />

Representación <strong>de</strong>l problema <strong>de</strong> grafo con ciclos<br />

grafo.pl<br />

◮ estado_inicial(?E) se verifica si E es el estado inicial.<br />

������������������<br />

◮ estado_final(?E) se verifica si E es un estado final.<br />

����������������<br />

����������������<br />

◮ sucesor(+E1,?E2) se verifica si E2 es un sucesor <strong>de</strong>l estado E1.<br />

������������� ������������� �������������<br />

������������� ������������� �������������<br />

������������� ������������� �������������<br />

������������� �������������<br />

17 / 48<br />

18 / 48

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!