Comments (6)
Hi @StepHaze,
It's probably due to the size of Mancala? i.e. I would guess something similar would happen with chess. The state space is too large, so most states are probably only visited once (or very small number of times). Tabular methods will only work on small games (e.g. Tic-Tac-Toe has ~4500 states total).
Try self-play DQN instead? It's basically Q-learning with function approximation and a few extra things (experience replay, target network, etc.)
from open_spiel.
Hi @StepHaze,
Try self-play DQN instead? It's basically Q-learning with function approximation and a few extra things (experience replay, target network, etc.)
I'm interested in it too. Can you please provide us with an example for DQN ?
from open_spiel.
Sure. In OpenSpiel all the agents follow the same API (they are subclasses of the agent base class). So, 99% of the code above can be re-used and you just have to change the instantiation of the agent to DQN instead of tabular_qlearner.QLearning.
There is a full example here.
from open_spiel.
Note the example above is a bit old and still uses the TF1-based DQN.
It can be easily swapped for the PyTorch DQN or JAX DQN if you prefer.
from open_spiel.
Hi @lanctot
Thank you Marc.
I always thought that a trained neural network (weights) should be stored in the external file, and be loaded every time the bot starts. Am I correct?
from open_spiel.
Sounds like you are talking about checkpoints. The DQN supports saving and loading the networks themselves, but not the replay buffer. But it's certainly not enabled by default. It's something you have to do manually in your training script (check the save + load methods in dqn.py). Or if you use JAX/PyTorch you can just serialize the agent via pickle and save/load that (which would then include the replay buffer).
from open_spiel.
Related Issues (20)
- Bug with nox HOT 3
- PPO and selfplay HOT 1
- Regarding the legality of commercially licensed board games HOT 2
- Block dominoes implementation HOT 2
- Adding a new python game HOT 7
- Problem with Julia API on Ubuntu 24.04 HOT 7
- Problem with Python AlphaZero using Keras 3 HOT 6
- Problem with RCFR using Keras 3 HOT 3
- Problem with TF2 version of Deep CFR using Keras 3 HOT 1
- Spades Implementation HOT 15
- Returned Policies and Exploitability HOT 2
- dqn_torch_test build failure HOT 6
- AlphaZero pseudo code available? HOT 2
- developing agents for team dominoes HOT 13
- [Puzzle] N-Queens HOT 7
- Spielviz gives AttributeError: module 'pyspiel' has no attribute 'GameParameter' HOT 28
- Failure in alpha_zero.py HOT 1
- chat_game_base.py prints lots of stuff during testing
- Issue with Downloading OpenSpiel Package via pip HOT 7
- Congestion games via C++ API HOT 5
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 open_spiel.