Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use forceStrat key in config.json ? #49

Open
captain-majid opened this issue Apr 28, 2020 · 9 comments
Open

How to use forceStrat key in config.json ? #49

captain-majid opened this issue Apr 28, 2020 · 9 comments

Comments

@captain-majid
Copy link

Hi mate, I'm trying to practice vs various Terran BOs, what values go in this key ?

@Jabbo16
Copy link
Owner

Jabbo16 commented Apr 29, 2020

Here is the list of strategies my bot is able to play:
https://github.com/Jabbo16/Ecgberht/tree/develop-cherryvis/src/ecgberht/Strategies

Inside each file, there is a "name" value, that's what you can input into the "forceStrat" key.

The "FE" variants are the same strategies as the non FE but the bot will try to expand a bit earlier.
The "GreedyFE" ones are transitions out of a "2RaxFE" build order.
"FastCC" is a 14CC opener that can transition into the other build orders depending on enemy race and game history.
Dont use the "PlasmaWraithHell" one, is just a quick (and bad) build order I kinda hard-coded for the "Plasma" map that can be used in CIG/COG tournament.

Also, my bot can react to whatever you are doing when it scouts you, so there is a possibility that It wont do the strategy you coded in that file as It will try to adapt.

PS: You should also disable the "cherryVis" option, its enabled by default in the config file but you dont really need it and can generate a lot of data if you play a lot of games.

@captain-majid
Copy link
Author

I changed "forceStrat": "JoyORush" --> but nothing happened, where exactly should the config.json be ?
"enableCherryVisDump": false --> by default

@Jabbo16
Copy link
Owner

Jabbo16 commented Apr 29, 2020

It should be in the same dir as the main jar file, I think the problem may be that some strategies are only allowed against some races, "JoyORush" only works against Protoss for example.

This is the code that adds strategies to each pool depending on enemy race:

https://github.com/Jabbo16/Ecgberht/blob/develop-cherryvis/src/ecgberht/StrategyManager.java#L52-L114

@captain-majid
Copy link
Author

No mate, Its TvP, and config.json is in the same dir, I still can't force any strategy.

@Jabbo16
Copy link
Owner

Jabbo16 commented Apr 30, 2020

How are you running the bot?
Just tried it and Its working fine for me:

image

This is how Im running it:
image

@captain-majid
Copy link
Author

captain-majid commented May 2, 2020

Thank you, I found the issue, it's a current path problem.
In your case, you're running java.exe from libs dir, which already has config.json in it.

But you have to consider that most people will not even run java -jar Ecgberht.jar from .\bwapi-data where config.json exists.

In case you run java.exe from a command line with admin privileges, this path will be C:\Windows\System32.
It'll be C:\Users\[user-name] when without privileges
In my case, the current path is C:\Windows (so I copied config.json there)
So... it's complicated (we already mentioned 4 cases) , better to have it as most devs hardcoded in .\bwapi-data\AI

Also there no indicator that the detection of config.json has happened or not.

@captain-majid
Copy link
Author

Also TwoPortWraith, ProxyBBS not forced TvP!

@Jabbo16
Copy link
Owner

Jabbo16 commented May 2, 2020

Weird, seems to work for me:
image

image

Both the jar and the config file are in C:\Starcraft\bwapi-data\AI

I think the problem is that you need to run the java command from the Starcraft directory (mirroring SSCAIT and other tournaments behaviour) or from the same dir as the jar file. I will add this info to the README as right now is kinda obscure is not even clear in sscait rules webpage.

I agree with the bot not printing any info about the loaded config file, I may add a "last try" logic so It tries to search for the config file from the same dir the jar file is located instead of relying on the path from where the java command was launched.

Both of those builds are not enabled for TvP, 2PortWraith is TvZ and ProxyBBS is very bad against all of the early zealot aggression I found in the sscait ladder (only Proxy8Rax is enabled vs Protoss).
In this case I think I should probably allow any strategy vs any race if is forced.

@captain-majid
Copy link
Author

BBS is common in TvP, yes allow any strategy vs any race if it is forced by user.

btw, I don't use BWAPI installer, I use BWAPI Revamped, so paths are a little different:
https://tl.net/forum/brood-war/531310-human-like-broodwar-ais-revamped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants