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.

82 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 sin ciclos<br />

Representación <strong>de</strong>l problema <strong>de</strong>l árbol<br />

Representación arbol.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 />

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 sin ciclos<br />

Solución <strong>de</strong>l problema <strong>de</strong>l árbol<br />

◮ profundidad_sin_ciclos(?S) se verifica si S es una solución<br />

<strong>de</strong>l problema mediante búsqueda en profundidad sin ciclos. Por<br />

ejemplo,<br />

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

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

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

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

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

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

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

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

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

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

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

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

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

9 / 48<br />

10 / 48

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

Saved successfully!

Ooh no, something went wrong!