Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
1a2eaa7a
Commit
1a2eaa7a
authored
Aug 24, 2012
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alpha beta continued
parent
85a04de5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
examples/programs/alphaBeta.mlw
examples/programs/alphaBeta.mlw
+4
-4
examples/programs/alphaBeta/why3session.xml
examples/programs/alphaBeta/why3session.xml
+2
-2
No files found.
examples/programs/alphaBeta.mlw
View file @
1a2eaa7a
...
...
@@ -20,7 +20,7 @@ theory TwoPlayerGame
function legal_moves position : list move
(** [do_move p m] returns the position obtained by doing the move [m]
on position [p].
on position [p].
*)
function do_move position move : position
...
...
@@ -56,7 +56,7 @@ theory TwoPlayerGame
match p with (p,n) -> minmax (do_move p m) n
end
clone import set.Min as MinMaxRec with
clone import set.Min as MinMaxRec with
type param = param,
type elt = move,
function cost = cost
...
...
@@ -66,7 +66,7 @@ theory TwoPlayerGame
axiom minmax_depth_non_zero:
forall p:position, n:int. n >= 0 ->
minmax p (n+1) =
minmax p (n+1) =
let moves = Elements.elements (legal_moves p) in
if Fset.is_empty moves then position_value p else
- MinMaxRec.min (p,n) moves
...
...
@@ -146,7 +146,7 @@ module AlphaBeta
{ let moves = Elements.elements l in
if Fset.is_empty moves then result = best else
let m = G.MinMaxRec.min (pos,depth) moves in
if alpha <= m <= beta then result = m
if alpha <= m <= beta then result = m
else if m < alpha then result < alpha else
result > beta
}
...
...
examples/programs/alphaBeta/why3session.xml
View file @
1a2eaa7a
...
...
@@ -316,7 +316,7 @@
expl=
"normal postcondition"
sum=
"f787a0002e5cbe96bcf77b3725ca5cac"
proved=
"true"
expanded=
"
fals
e"
expanded=
"
tru
e"
shape=
"iainfix <=aminmaxV2V3V1Aainfix <=V0aminmaxV2V3ainfix =aposition_valueV2aminmaxV2V3iainfix <aminmaxV2V3V0ainfix <aposition_valueV2V0ainfix >aposition_valueV2V1Iainfix =V3c0Iainfix >=V3c0F"
>
<label
name=
"expl:parameter negabeta"
/>
...
...
@@ -331,7 +331,7 @@
<transf
name=
"split_goal_wp"
proved=
"true"
expanded=
"
fals
e"
>
expanded=
"
tru
e"
>
<goal
name=
"WP_parameter negabeta.1.1"
locfile=
"alphaBeta/../alphaBeta.mlw"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment