================== Coach AI has arrived ! ==================
This simple BWAPI-AI/UDAI (User defined AI) is not designed to compete with another UDAI or human, instead its made to help me/newbie/intermediate/advanced/top players to test and sense and remember things that aren't easy/possible before.
Note: This works only with v1.16.1 using ChaosLauncher, it also works with ICCUP, you'll even get the win points, it wouldn't be a cheat but rather a declared treachery, but if one of the players is Computer, ICCUP server won't log the game.
======================================== List of features this helper UDAI currently has: ========================================
RealTime track of the number of workers assigned to Minerals and same for Gas.
RealTime track of the number of killed enemies.
Customizable notification sound and period when worker production stopped (1s), idle worker exist (5s) or you've missed multitasking (10s).
RealTime track of the number & type of idle production buildings, and warning when one idle for 10s (for Zerg, only the number of Larvae displayed).
RealTime track of the number & type of idle fighting units (only non-worker units that canAttackMove: HT, Siege-Mode Tank, Lurker cannot, Medics can !, also note that Hold position units aren't idle), and warning when one idle for 20s.
RealTime intel about all current enemies.
RealTime track of the number until supplies blocked and the number of supply units needed to max army.
autoTrainWorkers which train 1 worker @time from each base until 50 workers exist (for Zerg only 1 Hatchery is used for producing).
autoMine makes workers gather Minerals/Gas automatically like in SC2, so there is no idle worker.
autoBuildSuppliesBeforeBlocked when its 6 from being blocked (for Zerg only 1 Hatchery is used for producing), to disable it you can set this value to something like -200.
Detecting the game speed, by just looking at the FPS value: 24=Fastest, 21=Faster, 18=Fast, 15=Normal, etc..
Prevent the player from queuing 3 units from the same production building.
AnyRace_CoachAI.json: Allows the player to modify/disable/enable many values, also this config file can display a text block that appear constantly during the game (most of us might forget what was planned before the game, so a written BO and tips on the game screen might be a good practice for memory).
Message shortcuts the player can input and UDAI can understand: c1="show me the money", c2="black sheep wall", c3="operation cwal", c4="power overwhelming", c5="staying alive", c6="there is no cow level". UDAI=only in multiplayer (ICCUP/LAN) to acknowledge superiority from the non-CoachAI player, and that the CoachAI-player is not cheating by having intel about him.
RealTime track and record of the Macro actions build/train/upgrade and its time (the MacroLog).
Hotkeys tracker/counter to encourage more actions (more APM).
New hotkeys: F5=Toggle between the display of the MacroLog & the Hotkeys tracker/counter. Up,Down=Scroll through the MacroLog when more than one page exists. While on the Hotkeys tracker screen, you can press Control to display more of the enemies killed, Shift to briefly look at the multitask measures. F6=Displays units/buildings info, toggle the display mode of in progress units/buildings. F7=Switches between the preset game plans. F8=Switches between the current enemies infos, and also drawing the selected enemy army in the dark/fog, also pressing Shift toggles the display mode. F9=Finds the idle workers (similar to SC2). F11=Displays some walling tips.
A counter for each screen you step into, with total jumps during the game, the average stay @1 screen, the total stay on each screen for above 5s (customizable live, by editing totalTimeOnScreenOrSelectionAbove) and finally, a customizable notification sound when you stay @1 screen for above 10s (customizable live, by editing sameScreenOrSelectionWarningEvery).
Selection Multitasking:
A counter for each selection you select, with total switches during the game, the average focus @1 selection, the total focus on each selection for above 5s (customizable live, by editing totalTimeOnScreenOrSelectionAbove) and finally, a customizable notification sound when you focus @1 selection for above 10s (customizable live, by editing sameScreenOrSelectionWarningEvery).
WorkersCut log (only 2+ seconds cut is calculated): to see when exactly in the game you've stopped making workers and for how long (I personally record my screen to see what I was doing, because replay is not always an option).
Prevent making more workers after the default 9 min (to punish the player who doesn't make the ideal amount of workers early on), ofc you can change this default 9 min in the config file (workersProductionStoppedDuring).
Custom countdownTimer: just like seen in some missions, but you can use it in any map to practice/polish specific task/timing, when the timer ends the game will too, you can set the countdownTimer to whatever value you like (in seconds), it works whether its a game start or a saved game, use the "dontDrift" value in the config file to change it.
============================ Features on both game and replay: ============================
RealTime track of the number/type of units/buildings and also the ones in progress, and the remaining build time for each one in progress, also the remaining time for each Tech/Upgrade in progress.
The most accurate RealTime measure of Macro train/build/upgrade (Terran repairs not accounted), because most people tend to measure it just by the used supplies at specific time or by inaccurate replay analysis tools, on replay you can know @any second who is the best Macro player (same as the score screen you see at the end of game/replay).
Buildings that has Rally Point will draw a line to the RP.
Displaying the number of mineral workers on each Nexus/CC/Hatchery.
Displaying buildings gaps values and ground units sizes, for quick and easy reference to better walling (activated by pressing F11).
Minerals Above measure that counts the time of being above 250/500/750/1000 minerals.
Workers production stopped measure (Workers Cut), counts the time that Nexus/CC has been idle, if you have 2 bases the counter will be doubled, 3 -> tripled, etc.., it works for P & T, not Z, the default period for counting is the 1st 9m (540s), you can modify this by editing workersProductionStoppedDuring value in the .json file.
Idle Workers measure displays the number of idle workers, and the total lost time (as with Workers Cut, this increase when there is more Idle Workers).
Showing how many unit/building has been lost during the game/replay (just select one of the same type).
=================== Features on replay only: ===================
Showing the replay duration beforehand, and also the replay name, date, game title, game type and the map used.
Easily distinguishing which players against which players on team replays, (even SC:R doesn't has this !, maybe time to write some code lazy Blizzard ?)
During team replays showing if playerX allied with playerY, and if playerY also did the same.
RealTime track of taken tech & upgrades (you need to select any player's unit to display the infos, you'll find the Minerals Above counter with the same color as the selected player).
For understanding replays better, RealTime track of each unit order and drawing a line to the order target if there is a target.
Displaying live score of produced/killed/lost units/buildings, to get the current state of players, this is about unit/building control (more close to micro, same as the score screen you see at the end of game/replay).
Recording the max number of idle workers of each player, and when that happened.
The screen will automatically move to where a Nuclear launch, Comsat scan or Storm is positioned.
An intuitive/easier way to toggle vision of the selected player (and his allies) by pressing F7 (SCR requires that you blind ALL other players individually to get the vision of 1 player which is not smart, here we just need to select a player/or 1 of his allies to see the required vision).
You can ask the CoachAI questions like: Who wins? (or just "?"), How old r u?, r u male/female, who won the latest world cup? I'm kidding, he'll only answer the 1st 1.
Default/editable values: ==================
"autoTrainWorkers": true
"autoMine": false
"autoBuildSuppliesBeforeBlocked": 6
"maxWorkers": 50
"maxProductionBuildingQueue": 2
"totalTimeOnScreenOrSelectionAbove": 5
"sameScreenOrSelectionWarningEvery": 10
"workerCutWarningEvery": 1
"idleWorkerWarningEvery": 5
"idleProductionBuildingWarningEvery": 10
"idleFightingUnitWarningEvery": 20
"workersProductionStoppedDuring": 540
"logWorkersAndSupplyProduction": true
"logUnitsProduction": true
"replayLogUnitsFor": 420
"replayLogSupplyFor": 40
"dontDrift": -1
Screen shots: ===========
Installation: =========
Extract the .7z file contents from this topic to SC v1.16.1 folder.
Extract CoachAI.zip contents to StarCraft\bwapi-data folder.
Watch 1m from this video, but change the AI from Protoss_McRave.dll to AnyRace_CoachAI.dll.
On April 23 2018 03:08 L_Master wrote: Interesting idea, could definitely see this being a nice cue for newer players.
In every game, even top gamers forget things (like an idle worker here or there, maybe 5 workers !), so its not for newer players. Did you try it, or just read the description ?
On April 23 2018 03:08 L_Master wrote: Interesting idea, could definitely see this being a nice cue for newer players.
In every game, even top gamers forget things (like an idle worker here or there, maybe 5 workers !), so its not for newer players. Did you try it, or just read the description ?
I'd argue that top players are intentionally leaving workers idle in mid to late game. They strategically spend their apm on more important actions such as micro on units, defending and attacking, managing drops etc. Pros are generally aware that they macrod up a few workers and get to them a few minutes late without it being a big deal.
On April 23 2018 03:08 L_Master wrote: Interesting idea, could definitely see this being a nice cue for newer players.
In every game, even top gamers forget things (like an idle worker here or there, maybe 5 workers !), so its not for newer players. Did you try it, or just read the description ?
I'd argue that top players are intentionally leaving workers idle in mid to late game. They strategically spend their apm on more important actions such as micro on units, defending and attacking, managing drops etc. Pros are generally aware that they macrod up a few workers and get to them a few minutes late without it being a big deal.
I'm not saying intentionally, of course they were busy, (Best has 7 idle workers from 3 bases @7:09 in this replay), but won the game.
Edit: sometimes they don't even know that they have idle one, or they don't know how to find them easily, also 11 idle workers from 3 bases @9:31 from the same replay.
On April 24 2018 13:07 Golgotha wrote: Awesome stuff. I remember there was something similar back in the day. It didn't do as much as this, but it had build order helper. Can you add that?
You mean that, the link is dead, but that was a little different it was only for replays. I'll add a config file that do as in the ToDo, Is that what you mean ?
On April 23 2018 03:08 L_Master wrote: Interesting idea, could definitely see this being a nice cue for newer players.
In every game, even top gamers forget things (like an idle worker here or there, maybe 5 workers !), so its not for newer players. Did you try it, or just read the description ?
I'd argue that top players are intentionally leaving workers idle in mid to late game. They strategically spend their apm on more important actions such as micro on units, defending and attacking, managing drops etc. Pros are generally aware that they macrod up a few workers and get to them a few minutes late without it being a big deal.
I'm not saying intentionally, of course they were busy, (Best has 7 idle workers from 3 bases @7:09 in this replay), but won the game.
On April 24 2018 13:07 Golgotha wrote: Awesome stuff. I remember there was something similar back in the day. It didn't do as much as this, but it had build order helper. Can you add that?
You mean that, the link is dead, but that was a little different it was only for replays. I'll add a config file that do as in the ToDo, Is that what you mean ?
I remember something else. not just BO in the replay. but this old yoda program that supposedly allowed you to follow a BO on-screen. it's not that important but I thought that was cool and useful for fresh players. cant find the site. that site had a bunch of tools.
Wow, a built in text display that is customizable. crazy. can you use that during a ranked match? that would help new folks so much. and having it customizable to show what you need...can't believe it. it's kinda like the build order helper someone created for SC2.
Moataz, can the BO text be used on SC:R ladder? or would it be stopped by anti-hack? these tools are great for newcomers and struggling players, but it would b nice if we could have them on ladder and not just on iccup. btw your work is underrated bro. amazing stuff.
Thanks Golgotha, no problem I'm not a Royal Family Member here, or having liquipedia access !. Unfortunately BWAPI AIs doesn't even work with v1.18+, I'm not sure if they are going to make SC:R support BWAPI as they've said.
================ Upcoming features: ================ - RealTime track of the number & type of units/buildings and also the ones in progress. - Detecting the game speed, by just looking at the FPS value: 24=Fastest, 21=Faster, 18=Fast, etc.. - Applying the macro measure to replays: @1v1/BGH/Teams replays you can know @any second, which one is the best Macro player, and no, you can't get it by looking @his used supplies. - Workers production stopped for: works for P & T, not Z. This calculates the seconds in which each Nexus/CC has been idle (workers cut), with the ability to customize this calculation for only the 1st specified minutes.
Excuse me if I don't have much to add, I'm not getting much feedback, and almost ran out of ideas to improve this project. I guess this is because many people are lured by Blizzard to use the lack of features version (SC:R) which doesn't support BWAPI yet.
On June 03 2018 06:23 Moataz wrote: c++ scource code added.
Excuse me if I don't have much to add, I'm not getting much feedback, and almost ran out of ideas to improve this project. I guess this is because many people are lured by Blizzard to use the lack of features version (SC:R) which doesn't support BWAPI yet.
If you're looking for such feedback, I can help you with improving your C++ code. Just upload it on github or a similar place so I can create a pull request.
On June 03 2018 16:08 Moataz wrote: Thanks for contribution, sc-darkness, its spaghetti newbie code as I'm only good at c# not c++, check the 1st post.
I've created a quick pull request with my changes. I have some more ideas, but I need to spend more time reading your code and I need to check Coach AI too. I've not played BW for months, I'm playing SC2 right now.
I can create another pull request at some point if you wish. Also, your Visual Studio solution targets Windows 10 SDK (10.0.15063.0), so I had to download it explicitly just to compile. I don't know if that means users also need to have Windows 10 though.
Also, I wanted to remove the following line because I dislike it and I don't think it's advisable, but it's up to you:
What I was thinking about is to have someone take care of the project without needing my approval on changes, then when seeing a suitable update, make it and post the release here for others to see it, take your time.
I have Windows 8.1 64bit, it doesn't need 10, the AI can even work on XP but it needs downgrading the included BWAPI.dll version & "lib" folder.
You can also find active c++ devs and experienced BWAPI AI makers on this Discord channel, if you want any help.
For the lib.7z file, I was facing problems uploading the "lib" folder as whole due to my bad Internet, so I thought it might be easier if compressed, its now deleted from my own repository. But I'm bit confused about the forked version of your own repository, can't we both work on the same repository when needed ?
Maybe it's possible if you invite me, but I got an error saying I didn't have a permission so I had to create a fork to have a pull request. I'm happy to delete fork though.
In terms of Windows, maybe you have Windows 10 SDK installed even though you have Windows 8? I don't know, it refused to compile for me without the SDK. I either had to modify project settings or install the SDK. Sometimes Visual Studio 2017 installs stuff by default, and the SDK could be one of them.
I've accepted invite. I was just banned temporarily from TL, so I wasn't able to reply. I'll try to make some changes and create a pull request soon though.
Displaying live score of produced/killed/lost units/buildings, to get the current state of players, this is about unit/building control (more close to micro).
When selecting a unit/building in replay, displaying how many of this type has been killed during the game.
Game infos in now displayed even when the game is paused.
F8=Switches between the current enemies infos, and also drawing the selected enemy army in the dark/fog, also pressing Shift toggles the display mode.
F9=Finding idle workers easily like SC2.
"UDAI" text message, only in multiplayer (ICCUP/LAN) to acknowledge superiority from the non-CoachAI player, and that the CoachAI-player is not cheating by having intel about him.
More infos displayed in replays (date, game title and game type).
Customizable notification sound and period when worker production stopped (0s), idle worker exist (5s) or you've missed multitasking (10s).
Showing how many unit/building has been lost during the game/replay (just select one of the same type).
Multitasking++: Screen Multitasking: A counter for each screen you step into, with total jumps during the game, the average stay @1 screen, the total stay on each screen for above 5s (customizable live) and finally, a customizable notification sound when you stay @1 screen for above 10s (customizable live). Selection Multitasking: A counter for each selection you select, with total switches during the game, the average focus @1 selection, the total focus on each selection for above 5s (customizable live) and finally, a customizable notification sound when you focus @1 selection for above 10s (customizable live).
Added WorkersCut log (only 2+ seconds cut is calculated): to see when exactly in the game you've stopped making workers and for how long (I personally record my screen to see what I was doing, because replay is not always an option).
Prevent making more workers after the default 9 min (to punish the player who doesn't make the ideal amount of workers early on), ofc you can change this default 9 min in the config file (workersProductionStoppedDuring).
Added "c6" shortcut for "there is no cow level" cheat code.
Custom countdownTimer: just like seen in some missions, but you can use it in any map to practice/polish specific task/timing, when the timer ends the game will too, you can set the countdownTimer to whatever value you like (in seconds), it works whether its a game start or a saved game, use the "dontDrift" value in the config file to set it.
In replay, the screen will automatically move to where a Nuclear launch, Comsat scan or Storm is positioned.
In replay, an intuitive/easier way to toggle vision of the selected player (and his allies) by pressing F7 (SCR requires that you blind ALL other players individually to get the vision of 1 player which is not smart, here we just need to select a player/or 1 of his allies to see the required vision).
In replay, you can ask the CoachAI questions like: Who wins? (or just "?"), How old r u?, r u male/female, who won the latest world cup? I'm kidding, he'll only answer the 1st 1.
@rand0MPrecisi0n, you let me down badly in the thread you know, while I thought you might at least be neutral.
And I didn't say anything bad about you, I actually thanked you before on your previous tutorial videos, you also praised a previous version of the CoachAI.
I'm REALLY not urging you or anyone else into a discussion about the high-level ignorance about it (someone else knows if it useful/useless), but sorry, you didn't make any point/logic on your last 3 comments here.
You don't also have to comment on here. You can send me PM. Also if you think I'm an arrogant newbie and you're wasting your time with me, don't even PM me, you can just ignore me, I won't be sad. (we're not going to be enemies, we can talk later at different topics if you want).
On November 16 2018 05:26 ppp87 wrote: what's an ajmbek?
Trying to look like an innocent guy that doesn't know what's going on, and can't even use the mouse to click on a hyperlink on a web page on the Internet age?
Man if you aren't pretending, please leave TL quickly, there are wolves here that are starving to eat a newbie like u, trust me.
The plan has worked successfully, even Jealous came to the CoachAI thread (he always think I'm a useless newbie), which means he could use the CoachAI in the future.
Very big improvement, that's my biggest moment since I joined TL, really I don't remember any other moment I've been that happy since I joined here.
But the real happiness that, I took my revenge from a non-innocent guy, I just hope he doesn't make something bad to himself or one of his family members.
I repeat that's my biggest moment since I joined TL, very happy.
On November 16 2018 07:01 Moataz wrote: The plan has worked successfully, even Jealous came to the CoachAI thread (he always think I'm a useless newbie), which means he could use the CoachAI in the future.
Very big improvement, that's my biggest moment since I joined TL, really I don't remember any other moment I've been that happy since I joined here.
But the real happiness that, I took my revenge from a non-innocent guy, I just hope he doesn't make something bad to himself or one of his family members.
I repeat that's my biggest moment since I joined TL, very happy.
"All who believe in Allah and the last day, either say good or be silent." Muhammad
Nobody asked you to be a lawyer here, especially against the oppressed one, you know who started the fight, suddenly, without even any previous conversation, you're a good lawyer here though, thank you.
I think you shouldn't quote my signature implying: "Look at what Moataz saying and what he does ?", when you're saying that I'm cracked while it's me that is being attacked. You should 1st fix your language a little bit, before asking other people to be ideal. I didn't say bad words to the attacker, I just tried to prove that I can ignore/tolerate/accept somethings as a mild joke sometimes, and I can shot bullets without saying bad words sometimes, you don't expect any person to accept insults, right?
I also wonder why the attacker wasn't even warned compared to banning (me), 30 days.
BTW silent laughing won't hurt anyone, but a wiser person shouldn't even think that he is better than the others.