Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Groupe3-TicTacToe
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BAHRMAN Louis
Groupe3-TicTacToe
Commits
f0a3999c
Commit
f0a3999c
authored
Apr 23, 2020
by
Theo Delbecq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AlgoRechercheMinMax complété, petite correction ArbreMinMax, suppression de AlgoRechercheMinMax1
parent
82d9ee28
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
40 deletions
+12
-40
AlgoRechercheMinMax.class
build/classes/tictactoecodingame/AlgoRechercheMinMax.class
+0
-0
ArbreMinMax.class
build/classes/tictactoecodingame/ArbreMinMax.class
+0
-0
private.xml
nbproject/private/private.xml
+0
-1
AlgoRecherMinMax1.java
src/tictactoecodingame/AlgoRecherMinMax1.java
+0
-37
AlgoRechercheMinMax.java
src/tictactoecodingame/AlgoRechercheMinMax.java
+11
-1
ArbreMinMax.java
src/tictactoecodingame/ArbreMinMax.java
+1
-1
No files found.
build/classes/tictactoecodingame/AlgoRechercheMinMax.class
View file @
f0a3999c
No preview for this file type
build/classes/tictactoecodingame/ArbreMinMax.class
View file @
f0a3999c
No preview for this file type
nbproject/private/private.xml
View file @
f0a3999c
...
...
@@ -6,7 +6,6 @@
<file>
file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Coup.java
</file>
<file>
file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/CoupTicTacToe.java
</file>
<file>
file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Player.java
</file>
<file>
file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/AlgoRecherMinMax1.java
</file>
<file>
file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Joueur.java
</file>
<file>
file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/JoueurOrdi.java
</file>
<file>
file:/C:/Users/theo/Documents/Ecole/IMT%20Lille%20Douai/L3/Projet%20Info/groupe3-tictactoe/src/tictactoecodingame/Arbre.java
</file>
...
...
src/tictactoecodingame/AlgoRecherMinMax1.java
deleted
100644 → 0
View file @
82d9ee28
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
tictactoecodingame
;
import
java.util.ArrayList
;
/**
*
* @author senda
public class AlgoRecherMinMax1 extends AlgoRecherche {
ArrayList ListCoup;
/*public AlgoRecherMinMax1() {
}
@Override
public Coup meilleurCoup(Plateau _plateau, Joueur _joueur, boolean _ponder) {
ListCoup = _plateau.getListeCoups(_joueur);
return ;
}
}*/
/* L'idée c'est :
- Créer un arbre de coups :
On récupère les coups dispo
On fait toutes les possibilités d'enchaînement de coups (<N, <MaxCoupsRestants)
- On applique MinMax
- On rend le meilleur coup selon notre algorythme
*/
\ No newline at end of file
src/tictactoecodingame/AlgoRechercheMinMax.java
View file @
f0a3999c
...
...
@@ -65,7 +65,17 @@ public class AlgoRechercheMinMax extends AlgoRecherche{
}
ArbreMinMax
explore
=
new
ArbreMinMax
();
builder
(
explore
,
target
,
0
);
explore
.
MinMax
(
0
);
int
m
=
Integer
.
MIN_VALUE
;
Coup
c
=
null
;
for
(
int
i
=
0
;
i
<
explore
.
getfils
().
size
()
;
i
++){
int
n
=
explore
.
getfils
().
get
(
i
).
getvalue
();
if
(
n
>
m
){
m
=
n
;
c
=
explore
.
getfils
().
get
(
i
).
getcoup
();
}
}
return
c
;
}
//Fonction auxiliaire récursive de création de l'arbre des coups possibles
...
...
src/tictactoecodingame/ArbreMinMax.java
View file @
f0a3999c
...
...
@@ -71,7 +71,7 @@ public class ArbreMinMax {
return
coup
;
}
public
ArrayList
getcoups
(){
public
ArrayList
<
Coup
>
getcoups
(){
return
(
coups
);
}
...
...
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