Comments (2)
Definitely not a bug.
I think it's safe to say that using the minimax algorithm, a search depth of 2 is the most you're going to get when using this bot unless you have an insane supercomputer - the engine is just too slow. The exponential growth hurts much more than you may realize.
Just to give an idea of the amount of operations required for each search depth. Let's assume 4 moves and 5 switches per player, 9 decisions total. This means 81 "transpositions" to calculate (alpha-beta pruning exists and reduces this - but lets just use this as an example) Let's also assume each transposition takes 0.0001s to calculate each.
Search Depth | Number of Transpositions | Total Time (seconds) |
---|---|---|
1 | 81^1 = 81 | 81 * 0.0001 = 0.0081 |
2 | 81^2 = 6561 | 6561 * 0.0001 = 0.6561 |
3 | 81^3 = 531441 | 531441 * 0.0001 = 53.1441 |
As for this:
If not, perhaps the bot could detect when the timer is close to running out and reduce search depth at that point?
To use minimax properly, the entire calculation from 2 -> 3 needs to be done. So it could calculate for up to say ~10 seconds, but it wouldn't have enough information to make a better decision that if it just stopped at search depth=2. A monte-carlo-tree-search style algorithm would benefit from calculating in this way.
Regardless, I have good reason to believe that adding an additional search depth would not seriously improve the performance of the minimax bot. I ran the minimax bots head-to-head, one searching to a depth of 2, the other searching to a depth of 3 for about 500 gen8randombattle
games. It took a very long time, and in the end they were roughly equal in the number of wins.
I think to make a better Pokemon bot, a different algorithm entirely must be used.
from showdown.
Ah, makes sense. Was thinking 9 instead of 81, but of course the bot has to consider both your and your opponent's move. Thank you for the information :)
from showdown.
Related Issues (20)
- Docker or Python? HOT 8
- Gen1 HOT 2
- Is there a way to use just the battlebots? HOT 3
- How to get about stat in battle? HOT 2
- TypeError: 'NoneType' object is not subscriptable HOT 3
- Assigning "splash" when using team_datasets HOT 2
- Nicknames not including dashes in names
- Disable Dynamax/Terastallization? HOT 2
- Environs not recognized? HOT 12
- Can't Find Saved Replays HOT 3
- I can't get it to challenge a user. HOT 3
- Fainted Illusion Pokemon (might be known) HOT 2
- [Enhancement] Simple tera usage HOT 2
- Match does not end when saving replay HOT 4
- websockets.exceptions.InvalidMessage: did not receive a valid HTTP response HOT 1
- Separate out the engine into an installable library HOT 6
- Pokemon nicknames HOT 1
- bot cant connect to showdown HOT 4
- does not understand passers HOT 1
- Problem with starting up the bot HOT 2
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 showdown.