Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Collective risk game
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Liyao Zhu
Collective risk game
Commits
cb229164
Commit
cb229164
authored
Apr 5, 2019
by
Liyao Zhu
Browse files
Options
Downloads
Patches
Plain Diff
game.py and agent.py structure build1
parent
3f961675
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Collective-Risk_Dilemma.py
+1
-0
1 addition, 0 deletions
Collective-Risk_Dilemma.py
agent.py
+16
-0
16 additions, 0 deletions
agent.py
game.py
+6
-0
6 additions, 0 deletions
game.py
with
23 additions
and
0 deletions
Collective-Risk_Dilemma.py
+
1
−
0
View file @
cb229164
...
@@ -8,6 +8,7 @@ import matplotlib.pyplot as plt
...
@@ -8,6 +8,7 @@ import matplotlib.pyplot as plt
import
numpy
as
np
import
numpy
as
np
import
math
import
math
# Constants ____________________________________________________
# Constants ____________________________________________________
N
=
100
# Size of the population
N
=
100
# Size of the population
...
...
This diff is collapsed.
Click to expand it.
agent.py
0 → 100644
+
16
−
0
View file @
cb229164
import
game
class
Agent
():
def
__init__
(
self
):
self
.
undefined
=
None
def
chooseAction
(
selfs
):
return
0
\ No newline at end of file
This diff is collapsed.
Click to expand it.
game.py
0 → 100644
+
6
−
0
View file @
cb229164
import
agent
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
math
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