Programming Yet Another Pokemon Showdown Battle-Bot

Thanks for the replies Austin Maxouille , I should have mentioned what I've tried previously. I had tried both of your approaches before but with no success. The URL in the .env file refers to "sim.smogon.com" which is not the same as the server IP from psim.us - putting in the IP for nexus.psim.us or for the heroku app fails to connect. I'm not familiar enough with Showdown's structure to extract the websocket URI for a different server (if I can at all, anyway).

I can change the login_uri in websocket_client.py to "http://nexus.psim.us/action.php" but the login request simply receives a 307 redirect response to Showdown main (presumably because of having the default websocket).

Basically then, how would I find the websocket URI for my own server?
 
Thanks for the replies Austin Maxouille , I should have mentioned what I've tried previously. I had tried both of your approaches before but with no success. The URL in the .env file refers to "sim.smogon.com" which is not the same as the server IP from psim.us - putting in the IP for nexus.psim.us or for the heroku app fails to connect. I'm not familiar enough with Showdown's structure to extract the websocket URI for a different server (if I can at all, anyway).

I can change the login_uri in websocket_client.py to "http://nexus.psim.us/action.php" but the login request simply receives a 307 redirect response to Showdown main (presumably because of having the default websocket).

Basically then, how would I find the websocket URI for my own server?
You shouldn't need to change the login URI as logins are handled globally. All you should need to change is the websocket URI.

Trying sim.psim.us:8000 actually logs into the official PokemonShowdown websocket (the bot challenges on play.pokemonshowdown.com).

Inspecting what my browser is doing on nexus.psim.us and experimenting actually shows that the websocket IP for nexus.psim.us is 3.9.174.111, which works if you use `3.9.174.111:8000` as the websocket URI! The bot challenges on nexus.psim.us where it should be.

It doesn't look like there is any DNS associated with this IP, and if the IP is ephemeral it may change suddenly and stop working !

Hope that helps - you might want to talk to whoever owns the server.
 
You shouldn't need to change the login URI as logins are handled globally. All you should need to change is the websocket URI.

Trying sim.psim.us:8000 actually logs into the official PokemonShowdown websocket (the bot challenges on play.pokemonshowdown.com).

Inspecting what my browser is doing on nexus.psim.us and experimenting actually shows that the websocket IP for nexus.psim.us is 3.9.174.111, which works if you use `3.9.174.111:8000` as the websocket URI! The bot challenges on nexus.psim.us where it should be.

It doesn't look like there is any DNS associated with this IP, and if the IP is ephemeral it may change suddenly and stop working !

Hope that helps - you might want to talk to whoever owns the server.
That did it! Wow, it didn't even occur to me to even use the browser tools, haha! Thanks very much!
 
It isn't! Well, mostly not. I have some logic that will infer a choice-scarf if there is absolutely no other way the opponent could have gone before the bot. What I believe you're referring to is ruling out certain sets/spreads after doing/taking damage. Having the insight to do this is a HUGE aspect of competitive Pokemon, minimax or otherwise. It is what I am working on next.
but it does see moves previously played and understands that the opponent 100% for sure has that move right?
 
but it does see moves previously played and understands that the opponent 100% for sure has that move right?
Yes! If an off-meta move that the bot would never have guessed is used, that move will be in the evaluation for the next turn.

Furthermore, if the opposing Pokemon has used 4 different moves no additional moves will be guessed. Z-Moves and Max-Moves are ignored, the only thing I think is not handled well is Zoroark.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top