⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fig17_9.pl

📁 超多的prolog源代码 具体内容见压缩包里面的programs.txt
💻 PL
字号:
% Figure 17.9  A state-space definition for means-ends planning based on goal
% regression. Relations satisfied, achieves, preserves, regress, addnew and
% delete_all are as defined in Figure 17.8.


% State space representation of means-ends planning with goal regression
:- op( 300, xfy, ->).

s( Goals -> NextAction, NewGoals -> Action, 1)  :-   % All costs are 1
  member( Goal, Goals),
  achieves( Action, Goal),
  can( Action, Condition),
  preserves( Action, Goals),
  regress( Goals, Action, NewGoals).

goal( Goals -> Action) :-
  start( State),                    % User-defined initial situation
  satisfied( State, Goals).         % Goals true in initial situation

h( Goals -> Action, H)  :-                   % Heuristic estimate
  start( State),
  delete_all( Goals, State, Unsatisfied),    % Unsatisfied goals
  length( Unsatisfied, H).                   % Number of unsatisfied goals

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -