Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pingouins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bariatti Francesco
pingouins
Compare revisions
35bdc544bc0a072ac84bd351c0f45dd7c853c73c to master
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
francesco-bariatti/pingouins
Select target project
No results found
master
Select Git revision
Swap
Target
Samuel.Felton/pingouins
Select target project
francesco-bariatti/pingouins
Samuel.Felton/pingouins
Lucas.Clement/pingouins
3 results
35bdc544bc0a072ac84bd351c0f45dd7c853c73c
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/minmax/test_minmax.hpp
+0
-16
0 additions, 16 deletions
src/minmax/test_minmax.hpp
tools/gui.py
+0
-53
0 additions, 53 deletions
tools/gui.py
with
0 additions
and
69 deletions
src/minmax/test_minmax.hpp
deleted
100644 → 0
View file @
35bdc544
#ifndef __TEST_MINMAX_HPP__
#define __TEST_MINMAX_HPP__
namespace
minmax
{
class
test_minmax
{
void
play
();
template
<
typename
Game
>
int
select_move
(
Game
&
game
);
public:
test_minmax
();
};
}
#endif
This diff is collapsed.
Click to expand it.
tools/gui.py
deleted
100755 → 0
View file @
35bdc544
#!/usr/bin/env python3
#-*- encoding: utf-8 -*-
import
drawState
import
subprocess
import
json
import
os
if
__name__
==
"
__main__
"
:
programname
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
../bin/theturk
"
)
program
=
subprocess
.
Popen
(
programname
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
universal_newlines
=
True
,
bufsize
=
1
)
try
:
program
.
stdin
.
write
(
"
h
\n
"
)
while
True
:
#READ
readloop
=
True
comments
=
[]
json_data
=
""
brackets_count
=
0
while
readloop
:
line
=
program
.
stdout
.
readline
()
#print(line)
line
=
line
.
replace
(
"
who
'
s first? (h)uman/(c)omputer
"
,
""
)
line
=
line
.
replace
(
"
Red move:
"
,
""
)
line
=
line
.
replace
(
"
Blue move:
"
,
""
)
if
line
.
startswith
(
"
{
"
):
#Reading json
json_data
=
line
else
:
comments
.
append
(
line
)
if
line
==
"
\n
"
:
readloop
=
False
#PRINT STATE
print
(
"
Comments: {}
"
.
format
(
''
.
join
(
comments
)))
state
=
json
.
loads
(
json_data
)
drawState
.
drawBitboard
(
state
[
"
bitboards
"
][
"
onefish
"
],
state
[
"
bitboards
"
][
"
twofish
"
],
state
[
"
bitboards
"
][
"
threefish
"
])
print
(
"
Red penguins (Red score: {}, Total moves: {} [0..{}])
"
.
format
(
state
[
"
score
"
][
"
red
"
],
state
[
"
nb_moves
"
][
"
red
"
],
state
[
"
nb_moves
"
][
"
red
"
]
-
1
))
for
i
in
range
(
4
):
drawState
.
drawPenguin
(
state
[
"
penguins
"
][
"
red
"
][
i
])
print
(
"
Blue penguins (Blue score: {}, Total moves: {} [0..{}])
"
.
format
(
state
[
"
score
"
][
"
blue
"
],
state
[
"
nb_moves
"
][
"
blue
"
],
state
[
"
nb_moves
"
][
"
blue
"
]
-
1
))
for
i
in
range
(
4
):
drawState
.
drawPenguin
(
state
[
"
penguins
"
][
"
blue
"
][
i
])
#PLAY NEXT MOVE
if
state
[
"
current_player
"
]
==
"
Red
"
:
move
=
input
(
"
Enter Red move:
"
)
else
:
move
=
input
(
"
Enter Blue move:
"
)
program
.
stdin
.
write
(
move
+
"
\n
"
)
program
.
stdin
.
flush
()
except
BrokenPipeError
:
print
(
"
Game end
"
)
except
KeyboardInterrupt
:
print
(
"
\n
May the fish be with you.
"
)
finally
:
program
.
kill
()
This diff is collapsed.
Click to expand it.
Prev
1
…
6
7
8
9
10
Next