what is going on everybody welcome to
part 13 of our AI and Starcraft 2 with
Python tutorial series in this video
what we're gonna be doing is kind of
going over what I'm gonna refer to as
kind of stage 2 of our neural network
development here so the first test
proved to be at least somewhat
successful where the neural network was
at least better than random in the four
choices at beating the medium leveled AI
that's like built into the game so now
what we want to do is add complexity to
the AI and hopefully create an AI that's
a little more impressive than the one
that we just made and then see if we can
iterate on top of that a I at least do
one more iteration so like the last one
we created an AI it was pretty good the
next step would be to use that AI again
fighting hard AI or medium AI or or
itself or all three of those things and
see can we improve that AI even further
through that method of training because
if we can't well then I don't know what
we're doing here we got it look like
totally regroup and figure out what what
to do next so and again I have no idea
so that might be the case apologies now
so let's talk about some of the things
that we're wrong here some of the things
I want to change moving forward and all
that so first of all the names here
okay I guess I got lost yeah here supply
depot I don't know why I made that
mistake it should be command center but
also that can change you we'll fix that
later and in fact we're probably going
to fix it so what I'm gonna use it but
anyways just know I made that mistake
someone pointed that one out to me and
then also someone point out the random
variance here using the enemies start
location doesn't make any sense we
should be using variants of the whole
entire game map size because pick up
depending on where the enemies start
location is that's going to cause the
variance to be quite significantly
different so that was kind of dumb next
we have trekking game time much more
precisely no more kind of estimation we
can get much much closer that comes in
from our Quyet rest's i don't know how
to pronounce that but anyway the next
thing is rather than a same person to
rather than arbitrarily sizing our units
when we draw them we can actually just
use the units radius which makes a whole
lot more sense then we've got early
scouting lots of people took up issue
with that so as it stands right now we
weren't scouting until after four
minutes so what we want to do is send at
least a single worker out to scout
within that four minute range and
continue doing that until we've got the
observers and then once we have an
observer we don't just want one we
should have many observers and we really
need to cover all the expansion areas
one of the other suggestions was that
you have observers along the main attack
route we I might do that in the next
phase but in this one I don't really
think I'm gonna bother with that but we
definitely want to have at least the
bases covered and then once that
scouting logic is fixed we should be
able to end the games on time so anyways
that's what we're going to be working
towards and let's get into it the code
is from part 9 of this tutorial series
so if you don't have that go back to
part 9 and actually I pretty sure in the
tech yeah and the text-based version of
the tutorial I have the starting code
copy and pasted anyways okay so the
first thing is let's fix the time that's
a real easy quick one to fix in this
video I'm gonna comment out self to
iteration because
catch any other times we use self-taught
iteration we also could comment out
iterations per minute again we shouldn't
be using it anymore now that we know the
time so I'm gonna say self dot time and
we're gonna say that equals self dot
state game loop divided by a twenty two
point four I guess that's how many ticks
anyways and then I'm gonna do that's
gonna be the number of seconds and I'm
gonna divide that by 60 so it's in
minutes so self dot time is in minutes
because that's kind of the way we've
been thinking this whole time so I want
to retain that minutes feel so now we're
gonna do is just search for iteration
and basically fix all these now the
expand logic is no longer gonna take
really place here but like it's not
going to need this logic it's going to
be chosen by the AI itself but we'll
just do self dot time I'm gonna say
divided by 2
that just makes more sense to me
iteration let's see if we catch any
others so again this would just be self
dot time self dot time when unit star
gates is less than salt uptime build
another one okay that's fine
this one again self dot time is greater
than do something after and then the
random range is right here it's kind of
like in our seconds form I'm not really
sure about it but to call that but in
this case we would want to wait a random
dot R and range of like I don't know
somewhere between seven and a hundred
seconds but keep in mind self dot time
is in minutes so we want to go ahead and
divide that by a hundred so that's you
know up to not seconds I'm sorry
basically you know seven percent of a
minute to a hundred percent of a minute
that's how much we want to wait so next
self dot time
Plus wait cool that should be all the
changes we need to make there and
besides that the only other thing I want
to bring up is I'm just gonna bring over
the text-based version of the tutorial
here so these are the choices that we
are going to make as time goes on so
we're gonna go from four choices to 14
choices build a scout at a zealot Scout
as in the observer zealot is in the
fighter gateways and the thing that
builds the zealots and is required for
many other things void ray stalker proba
simulator to get the gas Stargate pylon
nexus or defend a nexus rather attack a
known enemy unit attack known enemy
structure expand do nothing also as I
say here the photon cannon is honorable
mentioned because I'm not gonna do it
now because the placement of that cannon
is also super important so I'm not
really gonna worry about the logic there
for that but that's probably something
we're gonna want to have by stage three
and yeah okay so that's it let me make
sure there's runs before I leave you
guys and begin another part while we
wait thank you to my recent sponsor
Steve Kim you stand alone in this video
but look how big you can be oh my god
thank you Steve Kim alright so hopefully
this is going to not air out we'll see
if things start moving looks good looks
very good
oh also I didn't really mention it too
even in the text-based version but we
should simplify our visuals you know
someone pointed out like why are you
using colored visuals and you know I
don't have any that I think I just in my
head I was like oh that makes sense to
make them colored but not really for the
AI to understand it's probably even it's
just more basic if we made it grayscale
so that's the other thing we we
definitely would want to be able to do
okay so I think that's all for now
in the next tutorial what we're gonna
work on is the scouting so the Scout
moving around no more we're just gonna
put the Scout at the expansion locations
and then order it by distance from the
enemy starting point I think that's the
best way to do it but obviously it's not
quite that simple as you can see the
scouts get destroyed or whatever and we
need to be you know having quite a bit
of handling for all of that kind of
stuff so anyway that is what we're going
to be doing in the next tutorial if
you've got questions comments concerns
whatever feel free to leave them below
otherwise as always thank you for your
support your subscriptions your
sponsorships all that stuff and I will
see you in another video