Feralidragon wrote:1 - Use the same principle behind hard drives:
They store the bytes in sectors, but each sector has a fixed number of bytes, so a file will just be spread across sectors and you have just a few sectors with a lot of bytes stored, with the last one just having some unused bytes, which is OK since each sector doesn't have too many of them for the waste to make a big difference, unless you have a lot of tiny files, which generally isn't the case.
UScript-wise, you can represent each "sector" as an Object, with a property as an array of floats of a specific length.
This length is left up to you to decide, as well as how you link the sectors together (linked list, tree, both, something else).
I have just coded a possible sector-based float linked list. I hope this works, but I'm half asleep. I'll verify it tomorrow! Check it right below:
- SectorList.zip
- Float sector linked list code
- (2 KiB) Downloaded 60 times
PrinceOfFunky wrote:Would the input data be pre-processed or it will be just images from the viewport?
EDIT: Nvm I guess they'll not be images since you're gonna use uscript only.
But then I wonder something, how will you let the bots recognize the level geometry without even using at least DLLs?
It doesn't use level geometry. The input set is:
- the XYZ coordinates of 10 traces (orthogonal and diagonal horizontal directions with no vertical aim, then directly up and down) (total 30 coordinates), all divided by 128 and subtracted by the bot's position (Sigmoid)
- (the health of the bot divided by 150 + the current enemy's health (0 if no enemy), divided by 150) (Softmax)
- the list of weapons available (Impact Hammer through Sniper Rifle, plus the Redeemer, so 11 weapons), where each input value is 1 if the bot has the weapon, or 0 if it doesn't (Linear)
- the conveyed list of every visible Pawn (size 3) (Sigmoid)
- the XYZ coordinates of current bot's velocity, divided by 128. (Sigmoid)
So 49 input nodes already.
And now... a few important notes:
1. A
classifier is a simple neural network that will give a rating to an item in a list. It is activated once for every item in the list, and the highest rating item is selected.
The classifier's input is the
criteria (small set of numbers, the same for every classification iteration, can for example be the output of another neural network when that one's output is criteria to pick ONE item in a list), and data about the item (e.g. conveyed characters for a string, or a Pawn's Input Info - see below). The classifier's output is ONE number, preferably not squashed by an activator like a sigmoid (we're not talking probabilities here, son).
2. The conveyed list of every visible Pawn is obtained like this, in UnrealScript-esque pseudocode (if we can classify this as pseudocode for using undefined local variables and shortcuts like that):
Code: Select all
res = New(class'FloatList'); // from my float sectors library
res.AddRepeated(0, 3);
foreach VisibleActors(class'Pawn', P)
{
PI = PawnInputInfo(P); // a function that makes an input list from a pawn
res = Conveyor.activate(class'FloatList'.static.Concatenate(res, PI));
PI.Destroy(); // where's my garbage collector ;_;
}
return res;
3. Pawn input info is a set containing p.Health, p.bIsPlayer (1 = true, 0 = false), p.PlayerReplicationInfo.Team / 4 (or -1 if no PRI), and . The input is a concatenation of the last iteration's output (or {0, 0, 0} if there was no previous iteration) and the current iteration's pawn input info. It returns the last iteration's output. I call that
dynamic list conveying, or just
conveying for short.
4. The order of the weapons in the available weapon listing is:
- Impact Hammer || Chainsaw
- Enforcer
- Bio Rifle
- Shock Rifle
- Pulse Rifle
- Ripper
- Minigun
- Flak Cannon
- Rocket Launcher
- Sniper Rifle
- Redeemer
The output will be (n usually ranges from 0 to 1 in choice-based ("Whether") outputs):
- Whether to target someone
- Length-3 criteria for the target classifier
- Whether to move forward (n > 0.5), backward (n < -0.5), or neither (0.5 >= n >= -0.5).
- Whether to strafe right (n > 0.5), left (n < -0.5), or neither (0.5 >= n >= -0.5).
- Whether to aim toward the target (n > 0.5), toward the navigation dest (n < -0.5), or neither (0.5 >= n >= -0.5).
- Whether to fire (n > 0.5), to alt-fire (n < -0.5), or neither (0.5 >= n >= -0.5).
- Whether to feign death (n > 0.5) if not already; if n <= 0.5 and it is still feigning, get up.
- Whether to crouch (n > 0.2).
- Whether to jump (n > 0.1).