Skip to content

Commit

Permalink
fixed pldoc
Browse files Browse the repository at this point in the history
  • Loading branch information
friguzzi committed Jun 18, 2016
1 parent d2b5bdb commit f312553
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions examples/inference/truel.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

:- begin_lpad.
/**
* survives(List,Individual,Round).
* survives(+List:list,+Individual:atom,Round:term).
*
* Individual survives the truel with List starting at Round
*
Expand All @@ -47,7 +47,8 @@
survives(L,A,T):-
survives_round(L,L,A,T).
/**
* survives_round(Rest,List,Individual,Round)
* survives_round(+Rest:list,+List:list,+Individual:atom,+Round:term)
*
* Individual survives the truel Round with Rest still to shoot and
* List truelist still alive
*/
Expand All @@ -66,7 +67,7 @@


/**
* best_strategy(A,Rest,L,S).
* best_strategy(+A:atom,+Rest:list,+L:list,-S:atom).
*
* The best strategy for truelist A with Rest remaining to shoot and
* L still alive is to aim at S (with '$' for the sky).
Expand All @@ -81,17 +82,17 @@


/**
* ev_action(A,Rest,L,S,P-S).
* ev_action(+A:atom,+Rest:list,+L:list,+S:atom,-C:couple).
*
* Tuelist A with Rest to shoot, L still alive performing action S survives
* with probability P
* with probability P in C=P-S.
*
*/
ev_action(A,Rest,L,S,P-S):-
mc_sample(survives_action(A,Rest,0,L,S),1000,P).

/**
* survives_action(A,Rest0,T,L0,S)
* survives_action(+A:atom,+Rest0:list,+T:term,+L0:list,+S:atom)
*
* A survives truel performing action S at round T with Rest0 to shoot in
* the round and L0 still alive
Expand All @@ -101,7 +102,7 @@
shoot(A,S,Rest0,L0,T,Rest,L1),
survives_round(Rest,L1,A,T).
/**
* shoot(H,S,Rest0,L0,T,Rest,L).
* shoot(+H:atom,+S:atom,+Rest0:list,+L0:list,+T:term,-Rest:list,-L:list).
*
* When H shoots at S with Rest0 to shoot in round T and L0 still alive,
* the truelist to shoot in the round become Rest and the truelist still
Expand Down Expand Up @@ -129,7 +130,7 @@
hit(_,c):1.

/**
* best_strategy_base(A,Rest,T,S).
* best_strategy_base(+A:atom,+Rest:list,+T:list,-S:atom).
*
* the best action for A when Rest follow him in the round and
* T is the list of surviving truelist, is S (with '$' for the sky)
Expand Down

0 comments on commit f312553

Please sign in to comment.