19.04.2013 Views

1. Cuál o cuáles de las siguientes afirmaciones a - Grupo de ...

1. Cuál o cuáles de las siguientes afirmaciones a - Grupo de ...

1. Cuál o cuáles de las siguientes afirmaciones a - Grupo de ...

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.

Hoja <strong>de</strong> Problemas 2 Búsqueda no informada<br />

están vacías. Cualquiera <strong>de</strong> el<strong>las</strong> pue<strong>de</strong> llenarse con el agua <strong>de</strong> un grifo G. Asimismo,<br />

el contenido <strong>de</strong> <strong>las</strong> jarras se pue<strong>de</strong> vaciar en una pila P. También es posible verter el<br />

agua <strong>de</strong> una jarra en la otra. No se dipone <strong>de</strong> dispositivos <strong>de</strong> medición adicionales.<br />

Se trata <strong>de</strong> encontrar una secuencia <strong>de</strong> operadores que <strong>de</strong>je exactamente dos litros<br />

<strong>de</strong> agua en Cuatro.<br />

(a) Mo<strong>de</strong>la este problema como un problema <strong>de</strong> búsqueda. Tendrás que <strong>de</strong>finir, por<br />

tanto, un estado inicial, el conjunto <strong>de</strong> estados meta, los operadores (especificando<br />

sus precondiciones y postcondiciones), así como el coste <strong>de</strong> cada operador.<br />

(b) Caracteriza el conocimiento a priori <strong>de</strong>l agente <strong>de</strong> resolución <strong>de</strong>l problema correspondiente.<br />

(c) Encuentra una solución al problema utilizando un algoritmo <strong>de</strong> búsqueda en<br />

amplitud.<br />

Solución<br />

(a) Estado inicial: {C = 0, T = 0}<br />

Estado final: {C = 2, T = }<br />

Operadores<br />

<strong>1.</strong> Op1: Llenar C <strong>de</strong> G(x,y)<br />

Pre: {x < 4}<br />

Post: {C = 4, T = y}<br />

2. Op2: Llenar T <strong>de</strong> G(x,y)<br />

Pre: {y < 3}<br />

Post: {C = x, T = 3}<br />

3. op3: VaciarCuatroEnP(x,y)<br />

Pre: {x > 0}<br />

Post: {C = 0, T = y}<br />

4. op4: VaciarTresEnP(x,y)<br />

Pre: {y > 0}<br />

Post: {C = x, T = 0}<br />

5. op5 LlenarCuatroDes<strong>de</strong>Tres(x,y)<br />

Pre: {x > 0 ∧ x < 4 ∧ x + y ≥ 4}<br />

Post: {C = 4, T = x + y − 4}<br />

6. op6 LlenarTresDes<strong>de</strong>Cuatro(x,y)<br />

Pre: {y > 0 ∧ y < 3 ∧ x + y ≥ 3}<br />

Post: {C = x + y − 3, T = 3}<br />

7. op7: VaciarTresEnCuatro(x,y)<br />

Pre: {y > 0 ∧ x + y < 4}<br />

Post: {C = x + y, T = x + y − 4}<br />

8. op8: VaciarCuatroEnTres(x,y)<br />

Pre: {x > 0 ∧ x + y < 3}<br />

Post: {C = x + y − 3, T = 3}<br />

(b) El agente sabe a priori el estado inicial, el estado final, los operadores y su coste<br />

(constante en este caso)<br />

Página 2 <strong>de</strong> 4

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

Saved successfully!

Ooh no, something went wrong!