fig22_2.pl
来自「超多的prolog源代码 具体内容见压缩包里面的programs.txt」· PL 代码 · 共 36 行
PL
36 行
% A game tree (Figure 22.2 translated to Prolog)
% moves( Position, PositionList): possible moves
moves( a, [b,c]).
moves( b, [d,e]).
moves( c, [f,g]).
moves( d, [i,j]).
moves( e, [k,l]).
moves( f, [m,n]).
moves( g, [o,p]).
% min_to_move( Pos): Player 'min' to move in Pos
min_to_move( b).
min_to_move( c).
% max_to_move Pos): Player 'max' to move in Pos
max_to_move( a).
max_to_move( d).
max_to_move( e).
max_to_move( f).
max_to_move( g).
% staticval( Pos, Value): Value is the static value of Pos
staticval( i, 1).
staticval( j, 4).
staticval( k, 5).
staticval( l, 6).
staticval( m, 2).
staticval( n, 1).
staticval( o, 1).
staticval( p, 1).
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?