2. Local Search In Continuous Space
: ์ง๊ธ๊น์ง๋ ํ์ฌ ๋ด๊ฐ ์ด๋ค state์ ์๋์ง, action์ ์ทจํ๋ฉด ์ด๋ป๊ฒ ๋๋์ง, ์ด์ฐ์ , ๊ทธ๋ฆฌ๊ณ ์ด ๊ฒ์์ ๊ท์น์ด ๋ญ์ง ์๋ ๊ฒฝ์ฐ์๋ค! ์ฆ fully observable, deterministic, discrete, and known environment!
discrete์ continuousํ ํ๊ฒฝ์ ๊ตฌ๋ถ์ ์๊ฐ์ด ๋ค๋ค์ง๋ ๋ฐฉ๋ฒ๊ณผ agent์ action๊ณผ percept์ ๋ฐ๋ผ ์ด๋ฃจ์ด์ง๋ค.
์ง๊ธ๊น์ง ์ค๋ช ํ๋ ์๊ณ ๋ฆฌ์ฆ์ผ๋ก๋ continuous state์ action space๋ฅผ ๋ค๋ฃฐ ์๊ฐ ์๋ค. (๋จ, first-choice hill climbing๊ณผ simulated annealing ์ ์ธ) ์๋๋ฉด ์ฐ์์ ์ธ ๊ฒฝ์ฐ branching factor๊ฐ ๋ฌดํํ ๋ง์ ๊ฐ๋ฅํ ๊ฒฝ์ฐ์ ์๊ฐ ๋๋ฌด๋๋ฌด ๋ง๊ธฐ ๋๋ฌธ์ด๋ค. ์ด๊ฑธ ๋ค ์ผ์ผํ ํ์ํ ์๋ ์์ผ๋...
1) Gradient Ascent/ Descent Search
์ด๋ฌํ continuous problem์ ํผํ๊ธฐ ์ํด์๋ ๊ฐ state์ neighborhood๋ฅผ discretize ํ๋ ๋ฐฉ๋ฒ์ด ์๋ค. ์ฆ, ์ฐ์์ ์ธ state๋ฅผ discrete state๋ก ๋ฐ๊ฟ์ฃผ๋ ๊ฒ์ด๋ค.
์ด์ฐ์ ์ธ ๊ฐ์ผ๋ก ๋ฐ๊ฟ์ฃผ๊ณ ๋๋ฉด ์ฐ๋ฆฌ๋ gradient๋ฅผ ๊ตฌํ ์ ์๋ค. objective funtion์ gradient๊ฐ์ ๊ฐ์ฅ ๊ฐํ๋ฅธ ๊ตฌ๊ฐ์ ๋ฐฉํฅ๊ณผ ์ ๋๋ฅผ ์๋ ค์ฃผ๋ vector ∇f(x)์ด๋ค. ์ฆ f(x)๋ฅผ ๋ฏธ๋ถํ ๊ฐ, ๊ธฐ์ธ๊ธฐ๊ฐ gradient ๊ฐ์ด๋ค. steepest-ascent hill climbing๋ ํ์ฌ state๋ฅผ x<- x+ a∇f๋ก ์ ๋ฐ์ดํธ ํ๋ฉด์ ์ํํ ์ ์๋ค. ์ด ๋ a๋ step size๋ผ๊ณ ๋ถ๋ฆฌ๋ ์์ ์์๊ฐ์ด๋ค.
์ด๊ฒ ๋ญ ์๋ฆฌ์ธ๊ฐ ํ๋ฉด, ๊ทธ๋ผ๋์ธํธ ๊ฐ, ์ฆ f(x)์ ๋ฏธ๋ถ๊ฐ์ ๋ฐ๋ผ์ x๊ฐ์ a ๋งํผ์ฉ ์ด๋์์ผ ๋๊ฐ๋ค๋ ์๊ธฐ๋ค. ๋ง์ฝ ์ต๋๊ฐ์ ๊ตฌํ๊ณ ์ถ์ผ๋ฉด, ๊ธฐ์ธ๊ธฐ๊ฐ ์์์ธ ๊ทธ๋ํ๋ฅผ ๋ฐ๋ผ ์ด๋ํด์ผํ ๊ฒ์ด๊ณ , ์ต์๊ฐ์ ๊ตฌํ๊ณ ์ถ์ผ๋ฉด ์์์ธ ๊ตฌ๊ฐ์ ๋ฐ๋ผ ์ด๋ํ๊ฒ ๋๊ฒ ์ง?
์ด object function์ ๋ฏธ๋ถ ๋ถ๊ฐ๋ฅํ ์ํฉ์์๋ ์ฌ์ฉํ ์ ์์ ์๋ ์๋๋ฐ, ์ด๋ด ๊ฒฝ์ฐ ์ฐ๋ฆฌ๋ x๊ฐ์ด ์กฐ๊ธ ๋ณํจ์ ๋ฐ๋ผ ์ฆ๊ฐํ๋ ์ ๋๋ ๊ฐ์ํ๋ ์์ ์์๋ด๋ empirical gradient๋ฅผ ์ด์ฉํ์ฌ ๊ทธ๋ํ์ ๊ธฐ์ธ๊ธฐ๋ฅผ ์ถ์ ํ ์ ์๋ค. empirical gradient search๋ ์ด์ฐ์ ์ธ ์ํฉ์์ steepest-ascent hill climbing๊ณผ ๊ฐ๋ค.
์ ์ ํ a๊ฐ์ ๊ตฌํ๋ ๊ฒ๋ ๋ฏธ์ ์ด๋ค. a๊ฐ ๋๋ฌด ์์ผ๋ฉด step์ด ๋๋ฌด ๋ง์ด ํ์ํ๊ณ , a๊ฐ ๋๋ฌด ํฌ๋ฉด search๊ฐ maximum์ด ์๋ ๊ตฌ๊ฐ์ ๋ฐ์ด ๋์ด๋ฒ๋ฆด ๊ฒ์ด๋ค.
* line search๋ ์ด๋ฌํ a์ ๊ฐ์ ์ ์ ํ ๊ตฌํ๋ ๋ฐฉ๋ฒ์ด๋ค. a์ ๊ฐ์ doubling ์์ผ๊ฐ๋ฉด์ f๊ฐ ๋ณํํ๋ ์ถ์ด๋ฅผ ์ ์ง์ผ๋ณด๋ค๊ฐ, ์ด๋์๊ฐ ํ ๊ฐ์ํด๋ฒ๋ฆฌ๋ ์ง์ ์ ์ฐพ๋๋ค. ๋ง์ฝ ์ด๋ค point์์ ๊ฐ์ํ๊ธฐ ์์ํ๋ฉด ๊ทธ ์ง์ point๋ฅผ new current state๋ก ์ถ๊ฐํ๋ค.
a->2a->4a ๋ก ์ด๋ํ๋ค๊ฐ 4a์์ ๊ฐ์ด ๊ฐ์๊ธฐ ๊ฐ์ํด๋ฒ๋ ธ์ผ๋๊น 2a๋ก ๋์๊ฐ state์ ์ถ๊ฐํ๋ค.
2) Newton-Raphson Method
Newton-Raphson Method๋ function์ ๊ทผ(g(x) = 0 ์ด ๋๋ ์ง์ )์ ์ฐพ๋ ๊ฐ์ฅ ์ผ๋ฐ์ ์ธ ๋ฐฉ๋ฒ์ด๋ค. g(x)์์ ๊ทผ์ x๊ฐ ๋์ x = x - g(x)/g'(x)๋ก ๊ทผ์ฌํด๊ฐ๋ฉฐ ๊ตฌํ ์ ์๋ค.
f์ maximum ๋๋ minimum ๊ฐ์ ๊ตฌํ๊ธฐ ์ํด์๋ gradient๊ฐ์ด (๊ธฐ์ธ๊ธฐ๊ฐ) 0์ด ๋๋ ์ง์ ์ ์ฐพ์์ผ ํ๋ค.
๊ทธ๋์ newton's formula ์์ g(x) = ∇f(x)๋ก ๋๊ณ ๊ทผ์ ์ฐพ๋ ๊ฒ์ด๋ค. ์ด๊ฑธ ๊ณต์์ผ๋ก ํ๋ฉด, ๊ฒฐ๊ตญ x = x 0 Hf^(-1)∇f(x) ๊ฐ ๋๋ค. ์ด์ฐ ํท๊ฐ๋ ค ๊ทธ๋์ ์ด Hf^(-1)์ด ๋ญ๋ฐ?? Hf = (∇f(x))'=(f(x))''์ฆ, f(x)์ ์ด๊ณ๋ํจ์์ด๋ค. ์ฌ์ค ๊ทธ๋์ ๊ทธ๋ฅ ์์ ์ x = x - g(x) / g'(x) ์์ g(x)์ f'(x)๋ฅผ ๋์ ํ ๊ฒ๊ณผ ๊ฐ๋ค. ์ฆ f'(x) = 0์ด ๋๋ x์ ๊ฐ์ x = x - f'(x) / f''(x)๋ก ๊ทผ์ฌํด๊ฐ๋ฉฐ ํธ๋ ๊ฒ์ด๋ค.
๋ณด๋ฉด x๊ฐ์์ g(x)/g'(x) ๊ฐ์ ๋นผ์ฃผ๋ค ๋ณด๋ฉด x๊ฐ์ด ๊ทผ์ ๊ทผ์ฌํ๊ฒ ๋๋ค. ์๋๋ฉด x=๊ทผ ์ผ ๋, g(x)๊ฐ 0์ด ๋๋๊น! ๊ณ์ ์กฐ๊ธ์ฉ ์กฐ๊ธ์ฉ ๋นผ์ฃผ๋ค๋ณด๋ฉด ์ธ์ ๊ฐ ๊ทผ์ ๊ฐ๊น์ ์ง๊ฒ ์ฅฌ
3. Searching with Nondeterministic Action
๋ง์ฝ agent์ ์ํด action์ด ์ํ๋์์ ๋ ๋ค์ state๊ฐ ํ์ฌ state์ ์ํด ์๋ฒฝํ ๊ฒฐ์ ๋ ๊ฒฝ์ฐ, ์ฆ ๋ค์ state๋ฅผ ์์ํ ์ ์๋ค๋ฉด ์ด ํ๊ฒฝ์ deterministicํ๋ค๊ณ ๋ถ๋ฅธ๋ค. ๊ทธ๋ ์ง ์์ผ๋ฉด stochasticํ๋ค. (stochastic์ ํ๋ฅ ์ ์ธ๊ฑฐ)
nondeterministic environment์์ ๊ฐ action๋ค์ action์ ์ทจํ์ ๋ ๊ฐ๋ฅํ outcome๋ค์ ํ๋ณด๋ฅผ ์์๋ ์์ง๋ง, ๊ทธ ์ค ๋ญ๊ฐ ๋ค์ state๊ฐ ๋ ์ง๋ ์ ์ ์๋ค. ๊ทธ ๊ฐ๊ฐ์ state์๋ ํ๋ฅ ์กฐ์ฐจ ์กด์ฌํ์ง ์๋๋ค. ์ฆ, ๋ญ๊ฐ ๋์ฌ์ง ์์ ๋ชจ๋ฅด๋๊ฑฐ๋ค.
๊ทธ๋์ ์ฐ๋ฆฌ๋ not fully observable ํ๊ฑฐ๋ not deterministic ํ๋ฉด environment๊ฐ uncertain ํ๋ค๊ณ ๋ถ๋ฅธ๋ค.
๋ง์ฝ environment๊ฐ nondeterministicํ๋ค๋ฉด, ์ผ์๋ฅผ ํตํด ์ธ์์ ํด์, action์ด ์ํ๋์์ ๋ ๊ฐ๋ฅํ outcome๋ค ์ค์์ ์ด๋ค outcome์ด ์ค์ ๋ก ์ผ์ด๋ฌ๋์ง๋ฅผ agent์๊ฒ ์๋ ค์ค๋ค.
์๋ก ๊ณ ์ฅ๋ ๋ก๋ด์ฒญ์๊ธฐ๊ฐ ์๋ค๊ณ ์น์. ์ฐ๋ ๊ธฐ๋ฅผ ๋นจ์ ๋ค์ผ์๋, ๊ทธ๋ ์ง ์์ ์๋,์ ์นธ๊น์ง ๋ค ๋นจ์๋ค์ผ์๋ ์๋ค. ๊ทธ๋์ ๋ฐฉ์ ์ฐ๋ ๊ธฐ๊ฐ ์์ด๋ ์๋ฅผ ํก์ํ ์ง ์ํ ์ง๋ฅผ ๋ชจ๋ฅด๋ ๊ฒ์ด๋ค. ๊ทธ๋์ ์ด vacuum world์๋ ์ด 8๊ฐ์ง์ ๊ฐ๋ฅ์ฑ์ด ์์ ์ ์๋ค. ์ด ์ค 7๊ณผ 8์ด goal state์ด๋ค.
* Contingency Plans
: environment๊ฐ nondeterministicํ ๋, ๋ฏธ๋์ percept์ ๊ฒฐ์ ๋์ด์ง ์ ์์ผ๋ฉฐ agent์ ๋ฏธ๋์ action์ ์ด๋ฌํ ๋ฏธ๋ percept์ ์์กดํ๋ค. ๊ทธ๋์ problem์ solution์ ์ด๋ ํ sequence๊ฐ ์๋๋ผ ๋ชจ๋ ๊ฒฝ์ฐ๋ฅผ ๋ค ์๊ฐํ๋ contingency plan(=strategy)์ ํํ๋ก ๋ํ๋์ง๋ค. ์๋๋ฉด ๊ฐ percept๋ง๋ค ์ํํ ์ ์๋ action์ด ๋ค ๋ค๋ฅธ๋ฐ, ๋ฏธ๋์ ์ด๋ค percept๊ฐ ๋ ์ง ๋ชจ๋ฅด๋๊น!
๊ทธ๋์ nondeterministic problems์ solution์ "if-then-else statements"๋ฅผ ํฌํจํ๋ค. ์ฆ sequence๊ฐ ์๋๋ผ tree์ ๊ผด๋ก ๋ํ๋๋ค๋ ๊ฒ์ด๋ค. ์ํํ๋ ๋์ ์ผ์ด๋ ์ ์๋ ๋ชจ๋ ๊ฒฝ์ฐ์ ์๋ฅผ ๊ธฐ๋ฐ์ผ๋ก action์ ์ ํํ ์ ์๊ฒ ํ๋ค.
ex) [if percept then action-1 else action-2]
1) AND-OR Search Trees
deterministic environment์์๋ ๊ฐ agent์ choice์ ๋ฐ๋ผ branch๊ฐ ์ค์ง ํ๋์๋ค. ๋ฐ๋ผ์ ๋ญ ์ด action์ ํ๋ ์ action์ ํ๋ ์ ํํ ์ ์์๊ณ state๋ค ๋ผ๋ฆฌ๋ or๋ก ๋ฌถ์ฌ ์์๋ค. ๊ทธ๋์ ์ด node๋ค์ OR node๋ผ๊ณ ๋ถ๋ฅธ๋ค.
๋ฐ๋ฉด nondeterministic environment์์๋ ๊ฐ action์ ๋ํ outcome์ด ๋ ๊ฐ ์ด์์ผ ์ ์๊ณ , action์ ๋ํ ๋ชจ๋ outcome์ด goal๋ก ๊ฐ ์ ์์ด์ผ action์ด solution์ด ๋ ์ ์์ผ๋ฏ๋ก AND node๊ฐ ๋๋ค.
์ด ๋ ๊ฐ์ง node๋ฅผ ์ด์ฉํด ๋ง๋ ๊ฒ ๋ฐ๋ก AND-OR tree์ด๋ค.
์ด ๋ LOOP๋ ์์ ์ด๋ฏธ ๋์์๋ state๋ก, ์ด node๋ ๋์ด์ ํ์ํด๋ณด์ง ์์๋ ๋๋ค. (=failure ๋ฅผ ๋ฆฌํดํ๋ค) ์ด node์ ์๋ฃจ์ ์ด ์๋ค๋ ๊ฒ์ด ์๋๋ผ, ์ด์ฐจํผ ์์ ์์์ผ๋๊น solution์ด ์๋ค๋ฉด ๊ฑฐ๊ธฐ์ ์ด๋ฏธ ๋์ฌ ๊ฑฐ๋๊น! ์ด ๋ ธ๋๋ ๋์ด์ ๋ณด์ง ์๊ฒ ๋ค๋ ์๋ฏธ์ด๋ค.
AND-OR search problem์ solution์ ๋ค์๊ณผ ๊ฐ์ ํน์ง์ ๊ฐ๋ subtree์ด๋ค.
- ๋ชจ๋ leaf๊ฐ ํ๋ํ๋ goal node์ด๋ค.
- ๊ฐ๊ฐ์ OR nodes์์๋ ํ ๋ฒ์ ํ๋์ action๋ง์ด ์ํ๋๋ค.
- ๊ฐ๊ฐ์ AND nodes์ ๋ชจ๋ ๊ฐ๋ฅํ outcome branch๊ฐ ํฌํจ๋๋ค.
๋จผ์ AND-OR-GRAPH-SEARCH๊ฐ ์์๋๋ฉด initial state๋ฅผ or search ํ๊ธฐ ์์ํ๋ค.
OR-SEARCH์์๋ ๋ง์ฝ ํ์ฌ state๊ฐ goal์ด๋ผ๋ฉด empty plan์ ๋ฆฌํดํด์ค๋ค. (์ด๋ฏธ plan์ ์ฐจ๊ณก์ฐจ๊ณก ์์ฌ์์)
๋ง์ฝ state๊ฐ ์ด๋ฏธ ์ง๋์จ path์ ์์๋๋ผ๋ฉด loop(cycle)์ด๋ฏ๋ก failure์ ๋ฆฌํดํด์ค๋ค.
๊ทธ๋ฆฌ๊ณ ๋์ state์์ ์ทจํ ์ ์๋ ๋ชจ๋ action์ ๊ฒ์ฌํด๋ณผ ๊ฒ์ด๋ค.
plan์ด๋ผ๋ ๋ณ์์ and-search์ ๊ฒฐ๊ณผ๋ฅผ ์ง์ด ๋ฃ๊ณ , ์ด ๊ฒฐ๊ณผ๊ฐ failure๊ฐ ์๋๋ผ๋ฉด ๊ธฐ์กด solution์ ํด๋นํ๋ plan ์ฆ action์ ์ถ๊ฐํด์ค๋ค. and-search๋ฅผ ๋ณด๋ผ ๋์๋ ํ์ฌ state์์ ํน์ ํ action์ ์ทจํ์ ๋ ๋์ฌ ์ ์๋ future state๊ณผ, ๊ธฐ์กด path์ ํ์ฌ state์ ์ถ๊ฐํด์ ๋ณด๋ด์ค๋ค.
๋ชจ๋ action์ ๊ฒ์ฌํด์ค ๋ค์์๋ ๋์ด์ ๋ณผ ๊ฒ์ด ์์ผ๋ฏ๋ก ๊ทธ๋ฅ failure ๋ฆฌํดํด์ค๋ค.
AND-SEARCH์์๋ or search์์ ๋ ์์จ, action์์ ๊ฐ๋ฅํ ๋ชจ๋ state์ ๊ฒฝ์ฐ๋ฅผ ๊ฒ์ฌํด๋ณผ ๊ฒ์ด๋ค.
๊ฐ state๋ง๋ค or-search๋ฅผ ๋ค์ ๋ณด๋ด์ ํ๋๋ผ๋ failure๊ฐ ๋๋ฉด and search์ ๊ฐ๋ failure๊ฐ ๋ ๊ฒ์ด๋ค.
๋ง์ฝ ๋ชจ๋ failure๊ฐ ์๋์๋ค๋ฉด, ์กด์ฌํ๋ state๋ค์ ๋ํ plan์ ์ ๋ถ returnํด์ค๋ค. ๊ทธ๋ฌ๋ฉด ์ด ์์ด๋ฅผ ๋ค์ or search๊ฐ ๋ฐ์์ plan์ ๋ฃ์๊ฑฐ๊ณ , ๊ทธ๋ ๊ฒ solution์ ํด๋น plan์ด ์ถ๊ฐ๋๊ฒ ๋๋ค.
* Cyclic Solutions
๊ทธ๋ ๋ค๋ฉด ๋ง์ฝ ์ฒญ์๊ธฐ ๋ฐํด๊ฐ ๊ณ ์ฅ๋์ ์ค๋ฅธ์ชฝ์ผ๋ก ๊ฐ๋ผ๋ ๋ช ๋ น์ ์ค๋ฅธ์ชฝ์ผ๋ก ๊ฐ ์๋, ๊ฐ๋งํ ์์ ์๋ ์๋ค๊ณ ๊ฐ์ ํด๋ณด์. ์ด ๊ฒฝ์ฐ cycle์ด ์๊ธฐ๊ฒ ๋๋๋ฐ, ๊ทธ๋ ๋ค๊ณ ํด์ ์ด ๊ฒฝ์ฐ solution์ด ์๋๊ฒ ์๋๋ค. ๊ทผ๋ฐ ์ด ๊ฒฝ์ฐ๋ฅผ loop๋ผ๊ณ ์ฒ๋ฆฌํด๋ฒ๋ฆฌ๋ฉด solution์ ์์ ์ฐพ์ง ๋ชปํ๋ ๊ฒฝ์ฐ๊ฐ ๋ฐ์ํ ์ ์๋ค. ๊ทธ๋ฌ๋ฉด ์ด๋ฌํ cyclicํ solution์ ์ด๋ป๊ฒ ํํ์ ํ ์ ์์๊น?
์ด ๊ฒฝ์ฐ plan์ ์ผ๋ถ์ label์ ๋ถ์ฌ์ ๊ณ์ ๋ฐ๋ณตํ๊ฒ ๋ง๋ค ์ ์๋ค. ๊ณ์๊ณ์ tryํด์ state๊ฐ ๋์ด๊ฐ solution์ผ๋ก ๋์ด๊ฐ ๋๊น์ง ๋ฐ๋ณตํ๋ ๊ฒ์ด๋ค. ์ฝ๊ฒ ์ฝ๋๋ก ์ฐ๋ฉด while(state==5) do action(right); ์ ๋๊ฐ ๋๊ฒ ์ง? ๊ทผ๋ฐ ์ฐ๋ฆฌ๋ labeling์ ํตํ๊ฑฐ๋๊น while ๋ณด๋ค๋ goto ๋ฌธ์ด๋ผ๊ณ ์๊ฐํ๋ฉด ์ฝ๋ค. state==5๋ฉด goto label1 ์์ ๋?
ex) [label-1 :, action -1 ,... , if percept then label-1 else action-2] : action-1(label-1)์ ํ์ ๋ ์ด๋ค ํน์ percept๊ฐ ๋์์ผ๋ฉด ๋ค์ action-1(=label-1), ์๋๋ฉด action-2๋ฅผ ์ํํด๋ผ.
4. Searching with Partial Observation
* Sensorless Problem ( = conformant problem)
: ์ผ์๊ฐ ๊ณ ์ฅ๋์ ํ์ฌ percept์ ๋ํ ์ ๋ณด๋ฅผ ๋ฐ์ง ๋ชปํ๋ ์ํฉ์ ๋ฌธ์
-> ํ์ฌ ๋ด ์ํ๊ฐ ์ด๋์ ์๋์ง ๋ชจ๋ฅด์ง๋ง, ์ผ๋จ์ ์ค๋ฅธ์ชฝ์ผ๋ก ์ด๋ํ๊ธฐ, ๋จผ์ง๋นจ์๋ค์ด๊ธฐ, ์ผ์ชฝ์ผ๋ก ์ด๋ํ๊ธฐ, ๋จผ์ง๋นจ์๋ค์ด๊ธฐ๋ฅผ ๋ค ์ํํ๊ณ ๋๋ฉด ๋ฌด์กฐ๊ฑด solution์ ๋์ฐฉํ ์๋ ์๋ค.
* Belief State
agent๊ฐ ์ฌ๋ฌ๊ฐ์ง ๊ฐ๋ฅํ state์ค ํ๋์ ์๋ค๊ณ ํ ๋, ํ๋์ action์ ๋ ์ฌ๋ฌ๊ฐ์ง ๊ฐ๋ฅ์ฑ ์ค์ ํ๋๋ฅผ ๋ง๋ค์ด ๋ผ ๊ฒ์ด๋ค. (deterministic ํ ๋) ์ด๋ ๊ฒ partially observableํ ๋ฌธ์ ๋ฅผ ํ๊ธฐ ์ํ ํค๊ฐ ๋ฐ๋ก Belief State์ด๋ค.
Belief state ๋ ์ด๋ค percept๊ณผ action์ sequence๊ฐ ์ฃผ์ด์ง ๊ฒฝ์ฐ, ํ์ฌ state์ผ ์ ์๋ ๋ชจ๋ physical state๋ค์ ๋งํ๋ค. ์ด sensorless problem์ ํด๊ฒฐํ๊ธฐ ์ํด์๋ physical state๊ฐ ์๋๋ผ belief state์ space๋ฅผ searchํด์ผํ๋ค. ๊ธฐ์กด ํ์ ๋ฌธ์ ์์ physical state๋ฅผ belief state๋ก ๋ฐ๊ฟ์น๊ธฐ ํ๋ค๊ณ ๋ณด๋ฉด ๋๋ค.
belief-state space์์๋ problem์ด fully obserbableํ๋ฐ, agent๊ฐ ์์ ์ belief state๋ฅผ ํญ์ ์๊ธฐ ๋๋ฌธ์ด๋ค. ๋ ๋์๊ฐ solution์ ํญ์ action๋ค์ sequence๋ก ๋ํ๋๊ฒ ๋ ๊ฒ์ด๋ค. ์ฆ, belief state ๋ ๋ฒจ์์๋ observable ๋ฌธ์ ๋ก ๋ฐ๋๊ฒ ๋๋ค.
1) Searching with Unobservable States : ๋ด๊ฐ ์ด๋ค state์ธ์ง ์ ํ ์ ์ ์์ ๋
physical problem P๊ฐ ์๋ค๊ณ ๊ฐ์ ํด๋ณด์. ์ด ๋ ์ฐ๋ฆฌ๋ Actionsp, Resultp, GoalTestp, StepCostp๋ฅผ ์ ์ํ ์ ์๋ค.
- Belief states: physical state์ ๋ชจ๋ ๊ฐ๋ฅํ set์ ํฌํจํ๋ belief-state space. ์ฆ physical state๋ฅผ ์์๋ก ๊ฐ์ง๋ ๋ชจ๋ ๊ฐ๋ฅํ ๋ถ๋ถ ์งํฉ. n๊ฐ์ state๊ฐ ์๋ค๋ฉด belief state๋ 2^n๊ฐ
- Initial state : ๋ชจ๋ Physical state๋ฅผ ํฌํจํ๊ณ ์๋ ์ ์ฒด ์งํฉ.
- Actions
๋ถ๊ฐ๋ฅํ action์ ์ทจํ์ ๋ ์๋ฌด๋ฐ ๋ณํ๊ฐ ์๋ค๋ฉด, ๊ฐ state์์ ๊ฐ๋ฅํ action๋ค์ ์ ๋ถ ํฉ์งํฉ ํด์ค๋ ๋จ
๋ถ๊ฐ๋ฅํ action์ ์ทจํ์ ๋ failure๊ฐ ๋๋ค๋ฉด ํฉ์งํฉ์ ํ๋ฉด ์๋๋ค. ๊ต์งํฉ์ ํด์ผ ํ๋ค.
- Transition model : ์ด๋ค action์ ์ํํ ํ ์๋ก์ด belief state๊ฐ ์์ฑ๋๋ ๊ณผ์ ์ prediction step์ด๋ผ๊ณ ๋ถ๋ฅธ๋ค.
b'(์๋ก์ด belief state) = Result(b, a) (state b ์์ action a ์ํ) == Predict(b, a)
deterministic action์ด๋ผ๋ฉด, Result(b,a)๋ b์ ๊ฐ๋ณด๋ค ์ปค์ง ์ ์๋ค. ์๋? ๋น์ฐํ๊ฒ๋ state b์์ action์ ์ทจํ๋ฉด ๊ฐ๊ฐ ํ๋์ new state b'๊ฐ ์์ฑ๋๋๊น!
Result(b,a) = {s' | s' = Resultp(s, a) ∧ s ∈ b} // s๊ฐ belief state์ ์์์ผ ๋ s'๋ resultp(s, a)์ด๋ค.
nondeterminism์ผ ๋ Result(b, a)๋ b์ ๊ฐ๋ณด๋ค ํด ์๋ ์๋ค.
Result(b,a) = {s' | s' ∈ Resultp(s, a) ∧ s∈b } = Us∈b Resultp(s, a) // s'๋ resultp(s,a)์์ ๋์ฌ ์ ์๋ ๋ชจ๋ ๊ฒฝ์ฐ์ ์์ด๋ค.
- goal test : beilef state ์์ ์๋ ๋ชจ๋ physical state๊ฐ goal์ ๋ง์กฑํ๋๊ฐ.
- path cost : ๋ชจ๋ state์์ action์ cost๋ ๋ค ๋์ผํ๋ค๊ณ ๊ฐ์ ํ๋ค. ๋ง์ฝ ๊ฐ์ action์ด ๋ค๋ฅธ state์์ ์๋ก ๋ค๋ฅธ cost๋ฅผ ๊ฐ๋๋ค๋ฉด, ๊ฐ belief state์ ๋ฐ๋ผ action์ ์ํํ๋๋ฐ ๋๋ cost๊ฐ ์ฌ๋ฌ๊ฐ์ง value ์ค ํ๋๊ฐ ๋์ด ๋ฒ๋ฆฐ๋ค. ์ด๊ฒ์ ๋๋ค๋ฅธ ๋ฌธ์ ๋ฅผ ์ผ๊ธฐํ ์ ์๋ค. ๊ทธ๋์ ๋ค ๋์ผํ๋ค๊ณ ๊ฐ์ ํ๋๊ฑฐ์.
์ด๋ ๊ฒ ๋ชจ๋ ๊ฐ๋ฅํ state๋ฅผ ํฌํจํ๊ณ ์๋ initial state์ผ๋ก ๋ถํฐ ํ์ ์๊ณ ๋ฆฌ์ฆ์ ์ฌ์ฉํ๋ฉด ๋๋ค.
* Pruning : ๊ฐ์ง์น๊ธฐ
: ์ด๋ค belief state b์ ๋ํด์ ํ action sequence๊ฐ solution์ด๋ผ๋ฉด, b์ subset ์ญ์ solution์ด๋ค. ๊ทธ๋ฌ๋ฏ๋ก ์ฐ๋ฆฌ๋ ๋ง์ฝ ์ด๋ฏธ superset์ subset์ด ์์ฑ๋์๋ค๋ฉด, ๋ค๋ฅธ level์์ ์ด superset์ผ๋ก ๊ฐ๋ path๋ค์ ๊ฐ์ง์น๊ธฐ ํด์ ๋์ด์ ๋ณผ ํ์๊ฐ ์๋ค. ์ด๋ฌํ pruning์ sensorless problem์ ํธ๋๋ฐ ์์ฃผ ์ข์ ํจ์จ์ฑ ๊ฐ์ ํจ๊ณผ๋ฅผ ๋ณด์ฌ์ค๋ค.
-> ์ ์ด์ [1, 2]์์ action b๋ฅผ ํ๋ฉด ๋ฐ๋ก goal์ด ๋์ฌ ์ ์๋๋ฐ ๊ตณ์ด action a ๋ฅผ ๊ฑธ์ณ์ goal๋ก ๊ฐ ํ์๊ฐ ์์.
* ๊ฐ์ฅ ํฐ ๋ฌธ์ ๋, ๊ฐ belief state๋ค์ ํฌ๊ธฐ์ด๋ค. ์๋ฅผ ๋ค์ด initial belief state๊ฐ 10x10์ด๋ผ๊ณ ํ๋ฉด, vacuum world๋ 100x2^100์ด ๋๋ค. ์ด๊ฑด.. states๋ค์ ๋ฆฌ์คํธ๋ฅผ atomic represetation์ผ๋ก ๋ํ๋ด๊ธฐ์ ๋๋ฌด๋ ๋ง๋ค....
-> ํ๋์ ์๋ฃจ์ ์ belief state๋ฅผ ๋ณด๋ค ์์ถ์ ์ธ ์ค๋ช ์ผ๋ก ๋ํ๋ด๋ ๊ฒ์ด๋ค. (ex. 100๊ฐ ๋ค ๊นจ๋)
-> belief state์์ state ์ผ๋ถ๋ฅผ ๋จผ์ ๊บผ๋ด์ searchํ๊ณ , ๋ค์ state๋ ๋ searchํ๊ณ . .. develop incremental belief-state search algorithm์ ์ด๋ค. ๋์จ ๋ต์ด ๊ฐ์ผ๋ฉด ๊ณ์ search๋ฅผ ํด ๋๊ฐ๊ณ . ํ๋๋ผ๋ solution์ด ๋์ค์ง ์์ผ๋ฉด failure.
2) Search with Partially Observable States : ์ผ๋ถ๋ง observableํ ๊ฒฝ์ฐ
์ด ๊ฒฝ์ฐ action, step cost, goaltest๋ ์์ ํ๋ sensorless problem๊ณผ ๊ฐ๋ค. ๋จ, transition model์๋ง ์กฐ๊ธ ์ฐจ์ด๊ฐ ์๋ค. ๋ค์ belief state๋ฅผ ๋ง๋ค๊ธฐ ์ ์ ์ด๋ค state๊ฐ ๊ฐ๋ฅํ ์ง ์์ธกํ๊ณ ๋, ๊ฐ๋ฅํ percept๋ฅผ ์ธก์ ํด์ผ ํ๋ค.
โ prediction stage : ์์ธก ๋จ๊ณ (sensorless problem๊ณผ ๋์ผ) : belief state b์์ action a๋ฅผ ์ํํ์ ๋ ๊ฐ๋ฅํ state b' = Predict(b, a)
โก observation prediction stage : ๊ด์ธก ์์ธก ๋จ๊ณ : predicted belief state์์ ๊ด์ธกํ ์ ์๋ percept๋ฅผ ์์ธกํ๋ค.
PossiblePercepts(b') = { o | o = Percept(s) ∧ s ∈ b' }
โข update stage : ๊ฐ percept๋ค์ด ๊ฐ๋ฅํ ์ ์๋ state๋ค๋ผ๋ฆฌ ๋ชจ์์ ์๋ก์ด belief state๋ก ๋ง๋ค์ด์ค๋ค.
b0 = Update(b', o) = {s | o = Percept(s) ∧ s ∈ b' }
์ด ์ธ ๋จ๊ณ๋ฅผ ํฉ์ณ์ ํํํ๋ฉด ๋ค์๊ณผ ๊ฐ๋ค.
Result(b, a) = { b0 | b0 = Update(Predict(b,a), o) ∧ o ∈PossiblPercepts(Predict(b,a))}
//๊ฐ๋ฅํ ๋ชจ๋ belief state์์ ๊ฐ๋ฅํ percept ์ค ํ๋๋ฅผ ๊ณจ๋ผ, ์ด percept๊ฐ ๋์ค๋๋ก ํ๋ belief state๋ค์ ์งํฉ์ b0์ update ์ํจ๋ค.
(a) ๋ฅผ ๋ณด๋ฉด ์ฒญ์๊ธฐ๊ฐ ์๋ ๋ฐฉ์๋ ๋จผ์ง๊ฐ ์๋์ง ์๋์ง๋ฅผ ์์ง๋ง ๋ค๋ฅธ ๋ฐฉ์๋ ๋จผ์ง๊ฐ ์๋์ง ์๋์ง๋ฅผ ๋ชจ๋ฅธ๋ค๊ณ ํ์. ์ด ๋ ๋๊ฐ์ง์ belief state๊ฐ ์กด์ฌํ๋ค. ์ด ๋ ์ฒญ์๊ธฐ๋ฅผ ์ค๋ฅธ์ชฝ์ผ๋ก ์ด๋์ํค๋ฉด ๋๊ฐ์ง์ state๊ฐ ๊ฐ๋ฅํ๋ค.(prediction) ์ด ๋ ๊ฐ๋ฅํ percept๋ ์ค๋ฅธ์ชฝ ๋ฐฉ์ ๋จผ์ง๊ฐ ์๊ฑฐ๋/ ์๊ฑฐ๋. ์ฆ ์ด ์ฌ์ค์ ๋ฐํ์ผ๋ก prediction belief state๋ฅผ ๋ถ๋ฆฌํ์ฌ ๊ฐ๊ฐ update ์์ผ์ค๋ค.
(b)์ ๊ฒฝ์ฐ๋ ๋ฐํด๊ฐ ๊ณ ์ฅ๋ ๊ฒฝ์ฐ์ด๋ค. ์ค๋ฅธ์ชฝ์ผ๋ก ๊ฐ๋ผ๋ action์ ๋ช ๋ นํ์ ๋ ๊ฐ๋ฅํ belief state๋ ์ด 4๊ฐ์ง ์ด๋ค. ์ฌ๊ธฐ์ ๊ฐ๋ฅํ percept๋ [์ฒญ์๊ธฐ๊ฐ ์ค๋ฅธ์ชฝ์ ์๊ณ ๋ฐฉ์ด ๋๋ฝ๋ค], [์ฒญ์๊ธฐ๊ฐ ์ผ์ชฝ์ ์๊ณ ๋ฐฉ์ด ๋๋ฝ๋ค], [์ฒญ์๊ธฐ๊ฐ ์ค๋ฅธ์ชฝ์ ์๊ณ ๋ฐฉ์ด ๊นจ๋ํ๋ค] ๋ผ๋ ์ธ ๊ฐ์ง ๊ฒฝ์ฐ๋ก ๋๋ ์ ์๋ค. ๊ทธ๋ฆฌ๊ณ ๊ฐ๊ฐ์ percept๊ฐ ๋์ฌ ์ ์๋ belief state๋ฅผ update ํด์ค๋ค.
์ด๋ ๊ฒ partially observableํ ๋ฌธ์ ์์๋ action์ ์ทจํ ๋ค์์ ์ ํํ ์ด๋ค percept๊ฐ ์ฌ ์ ์๋์ง ์์ํ๋ ๊ฒ์ด ๋ถ๊ฐ๋ฅํ๋ค. ๋ฐ๋ผ์ nondeterminism ํ๋ค. ์ด๋ฌํ ์ํฉ์์๋ ์ฐ๋ฆฌ๊ฐ AND - OR search tree๋ฅผ ๊ทธ๋ฆด ์ ์๋ค.
* AND-OR search for Partial observability
: solution์ belief state์ ๋ํ conditional plan์ผ๋ก ๋ํ๋๊ฒ ๋๋ค.
agent๋ action์ ์ํํ๊ณ percept๋ฅผ ๋ฐ๋ ๋์์ belief state๋ฅผ ์ ์งํด์ผ ํ๋ค. ์ด function์ ์ฌ๋ฌ๊ฐ์ง ์ด๋ฆ์ผ๋ก ๋ถ๋ฆฌ๋๋ฐ monitoring, filtering, state estimation์ด ์๋ค.
new belief state b' = Update(Predict(b, a), o)
- ํ์ฌ state์์ subset ๋๋ supersets์ด ์ ์ ์์ฑ๋์ ์ด ์๋์ง ํ์ธํจ์ผ๋ก์จ imporveํ ์ ์๋ค
- ๋ํ incremental search algorithms์ ํตํด black-box approach์ ๋นํด ๋ ๋น ๋ฅธ ์๋๋ฅผ ๋ณด์ฌ์ค ์ ์๋ค.
(๋ ๋ค sensorless problem๊ณผ ๊ฐ๋ค)
'๐ก๐ธ๐ธ๐ถ5: ๐ฆ๐๐๐๐ถ ๐ฐ๐๐พ๐ > Artificial Intelligence(COSE361)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ธ๊ณต์ง๋ฅ] 6. Constraint Satisfaction Problems (0) | 2021.04.24 |
---|---|
[์ธ๊ณต์ง๋ฅ] 5. Adversarial Search(์ ๋์ ํ์) (0) | 2021.04.24 |
[์ธ๊ณต์ง๋ฅ] 4. Beyond Classical Search - 1 (0) | 2021.04.24 |
[์ธ๊ณต์ง๋ฅ] 3. Solving problems by searching - 3 (0) | 2021.04.24 |
[์ธ๊ณต์ง๋ฅ] 3. Solving problems by searching - 2 (0) | 2021.04.23 |