Comments (1)
The game is an abstract tree and doesn't really have anything to render. Below I've generated a game with max_actions=2, depth_bound=2, max_transitions=1
. I hope it will help you understand the nature of the 'tree game':
index: 0
index matrix:
tensor([[[0, 0],
[0, 0]]])
value matrix:
tensor([[[0., 0.],
[0., 0.]]])
index: 1
index matrix:
tensor([[[2, 3],
[4, 5]]])
value matrix:
tensor([[[-1., -1.],
[ 1., 1.]]])
index: 2
index matrix:
tensor([[[0, 0],
[0, 0]]])
value matrix:
tensor([[[-1., -1.],
[-1., -1.]]])
index: 3
index matrix:
tensor([[[0, 0],
[0, 0]]])
value matrix:
tensor([[[-1., 1.],
[-1., -1.]]])
index: 4
index matrix:
tensor([[[0, 0],
[0, 0]]])
value matrix:
tensor([[[ 1., 1.],
[-1., -1.]]])
index: 5
index matrix:
tensor([[[0, 0],
[0, 0]]])
value matrix:
tensor([[[ 1., 1.],
[-1., 1.]]])
The index in the first dimension of the game data tensor corresponds to the state. With the parameters above the game that is generated will have 5 non-terminal states. One is the root and the others correspond to the entries in the 2x2 matrix at the root. These have indices [1, 5]. The index 0 is just an absorbing state.
The entries in the 'index matrix' are the indices the state will transition to after both row and column player jointly select it.
Notice how the index matrix at root matrix has values 2, 3, 4, and 5. These are the subsequent states. All other states are terminal, so their index matrices are all 0. This means they transition to the absorbing state at index 0.
The entries in the value matrix are the Nash equilibrium payoffs for the row player at the state that entry will transition to.
For example, the upper left entry of the value matrix at the root has value -1. This is because the state at index 2 has all values = -1 in its own value matrix; No matter what both players do at the index=2 state do, they will transition to the terminal/absorbing state and the row player receives reward=-1.
Other games are outside the scope of this project. You will have to learn from the regularization code in rnad.py and apply it to your use case. Hope this helps!
from r-nad.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r-nad.