Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EI Jeux Evolutionnaires
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Santos Garcia Carlos
EI Jeux Evolutionnaires
Commits
132ac6d8
Commit
132ac6d8
authored
5 years ago
by
Muller Sacha
Browse files
Options
Downloads
Patches
Plain Diff
Correction mutation
parent
a7eeb77d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
individu.py
+21
-1
21 additions, 1 deletion
individu.py
with
21 additions
and
1 deletion
individu.py
+
21
−
1
View file @
132ac6d8
...
...
@@ -31,6 +31,26 @@ class Individu():
self
.
score
=
1
/
(
distance
+
diff_angle
)
__ORIGINAL_ROT_TABLE
=
{
\
"
AA
"
:
[
35.62
,
7.2
,
-
154
,
0.06
,
0.6
,
0
],
\
"
AC
"
:
[
34.4
,
1.1
,
143
,
1.3
,
5
,
0
],
\
"
AG
"
:
[
27.7
,
8.4
,
2
,
1.5
,
3
,
0
],
\
"
AT
"
:
[
31.5
,
2.6
,
0
,
1.1
,
2
,
0
],
\
"
CA
"
:
[
34.5
,
3.5
,
-
64
,
0.9
,
34
,
0
],
\
"
CC
"
:
[
33.67
,
2.1
,
-
57
,
0.07
,
2.1
,
0
],
\
"
CG
"
:
[
29.8
,
6.7
,
0
,
1.1
,
1.5
,
0
],
\
"
CT
"
:
[
27.7
,
8.4
,
-
2
,
1.5
,
3
,
0
],
\
"
GA
"
:
[
36.9
,
5.3
,
120
,
0.9
,
6
,
0
],
\
"
GC
"
:
[
40
,
5
,
180
,
1.2
,
1.275
,
0
],
\
"
GG
"
:
[
33.67
,
2.1
,
57
,
0.07
,
2.1
,
0
],
\
"
GT
"
:
[
34.4
,
1.1
,
-
143
,
1.3
,
5
,
0
],
\
"
TA
"
:
[
36
,
0.9
,
0
,
1.1
,
2
,
0
],
\
"
TC
"
:
[
36.9
,
5.3
,
-
120
,
0.9
,
6
,
0
],
\
"
TG
"
:
[
34.5
,
3.5
,
64
,
0.9
,
34
,
0
],
\
"
TT
"
:
[
35.62
,
7.2
,
-
154
,
0.06
,
0.6
,
0
]
\
}
def
mutation
(
self
,
proba
=
P1
):
table_rotations
=
self
.
table
.
rot_table
for
doublet
in
table_rotations
:
...
...
@@ -39,7 +59,7 @@ class Individu():
if
tir
<
proba
:
print
(
"
mutation
"
,
doublet
,
coord
)
print
(
"
table
"
,
table_rotations
[
doublet
][
coord
])
table_rotations
[
doublet
][
coord
]
=
np
.
random
.
uniform
(
low
=
self
.
table
.
__ORIGINAL_ROT_TABLE
[
doublet
][
coord
]
-
self
.
table
.
__ORIGINAL_ROT_TABLE
[
doublet
][
coord
+
3
],
high
=
self
.
table
.
__ORIGINAL_ROT_TABLE
[
doublet
][
coord
]
+
self
.
table
.
__ORIGINAL_ROT_TABLE
[
doublet
][
coord
+
3
])
table_rotations
[
doublet
][
coord
]
=
np
.
random
.
uniform
(
low
=
Individu
.
__ORIGINAL_ROT_TABLE
[
doublet
][
coord
]
-
Individu
.
__ORIGINAL_ROT_TABLE
[
doublet
][
coord
+
3
],
high
=
Individu
.
__ORIGINAL_ROT_TABLE
[
doublet
][
coord
]
+
Individu
.
__ORIGINAL_ROT_TABLE
[
doublet
][
coord
+
3
])
print
(
"
table
"
,
table_rotations
[
doublet
][
coord
])
individu1
=
Individu
(
RotTable
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment