Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
exapunks-hackmatch-bot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
exapunks-hackmatch-bot
Commits
5d8c67cd
Commit
5d8c67cd
authored
Apr 11, 2020
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print groups in debug output
parent
48a6ae87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
strategy.py
strategy.py
+16
-0
No files found.
strategy.py
View file @
5d8c67cd
...
@@ -352,6 +352,14 @@ class State:
...
@@ -352,6 +352,14 @@ class State:
return
cls
.
points
,
cls
.
fragmentation
,
cls
.
holes
,
cls
.
nmoves
return
cls
.
points
,
cls
.
fragmentation
,
cls
.
holes
,
cls
.
nmoves
def
print_groupsizes
(
self
):
for
start
in
range
(
len
(
self
.
groupsizes
)
-
COLUMNS
,
-
1
,
-
COLUMNS
):
print
(
' '
.
join
(
'%-2d'
%
g
for
g
in
self
.
groupsizes
[
start
:
start
+
COLUMNS
]))
def
print_groups
(
self
):
for
start
in
range
(
len
(
self
.
groups
)
-
COLUMNS
,
-
1
,
-
COLUMNS
):
print
(
' '
.
join
(
'%-2d'
%
g
for
g
in
self
.
groups
[
start
:
start
+
COLUMNS
]))
def
print
(
self
):
def
print
(
self
):
print_board
(
self
.
blocks
,
self
.
exa
,
self
.
held
)
print_board
(
self
.
blocks
,
self
.
exa
,
self
.
held
)
...
@@ -458,6 +466,14 @@ if __name__ == '__main__':
...
@@ -458,6 +466,14 @@ if __name__ == '__main__':
state
.
print
()
state
.
print
()
print
()
print
()
print
(
'groups:'
)
state
.
print_groups
()
print
()
print
(
'groupsizes:'
)
state
.
print_groupsizes
()
print
()
start
=
time
.
time
()
start
=
time
.
time
()
newstate
=
state
.
solve
()
newstate
=
state
.
solve
()
end
=
time
.
time
()
end
=
time
.
time
()
...
...
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