[SA2B] Relationship between Chao Stats and Velocity (Ongoing)

A forum for those who are able to contribute information for the main website, and help the website become the #1 source for Chao!
Post Reply
User avatar
Quickhand413
Newborn Chao
Newborn Chao
Posts: 7
Joined: Wed Mar 30, 2016 2:02 am
Motto: Every question probably has an answer.

[SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Quickhand413 » Wed Mar 30, 2016 2:48 am

Hello Chao Community,

I've been racing chao a lot in my SA2B game, and I thought I'd conduct some research on the relationship between the numerical value between the chao's stats and the speed at which the chao travels. It's in it's EXTREMELY early stages (only have 5 data points out of the 400 I've got planned), and it's going to attempt to track the velocity of a chao at different stat values, from it's inital value of 0 all the way to the "perfect" chao stat of 3266, the stat soft cap at 4000, and the stat hard cap at 65535 (highest value for a 16-bit integer.) If any of you guys are interested I'm going to post semi-regularly once I have some concrete evidence on their stats, and I do have a couple of loose ends that would make the study even more scientific if there are users who can help me out with this (such as making a definite measurement system like pixels/second or Chaolengths/second) (Also, I'm new to the Forums area, so if I should create a separate thread in the Chao Help section, please let me know!) If you want to provide some data points for the study yourself, the way I'm conducting the study is as follows:

I'm using SA2B on Steam, and using the Fusion Chao Editor to manipulate the stats.
1) The chao should have a stamina stat high enough to last them through a beginner race without boosting.
2) The stat being tested will be set at the value to be tested at, all other stats will be left at 0
3) the measurements will be taking place on the beginner course that tests that specific stat.
4) The time for the stat will be measured only when that stat is active, and not before the race
(The figures I have for this is for the Swim stat in the beginner race, one should subtract 2.75 seconds from their result, that's how long it takes to hop in. The Power course has about 3.8 seconds of running when the Run stat equals 0, The run course doesn't need this figure b/c all you're doing is running, and it takes about 8 seconds to jump off to the flying segment in the flying race, but it's variable depending on other chao's behavior.)
5) The timing ends when either the race ends, or the segment of the race that uses the stat ends (only in the flying race.)

Hopefully this study will produce some interesting mathematical relationship between stat and velocity, and benefit the Chao Community as a whole.

On a side note, I discovered through some of my early testing that when you use a Chao's stamina to cheer it and make it go faster, the chao's velocity increases by about 30% (I had 2 1.30's and 1 1.27, so it's a safe assumption that velocity goes from 1 to 1.3 when cheered)

-Quickhand413
Until next time! :chaohappy:
Quickhand413

User avatar
Quickhand413
Newborn Chao
Newborn Chao
Posts: 7
Joined: Wed Mar 30, 2016 2:02 am
Motto: Every question probably has an answer.

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Quickhand413 » Mon Apr 11, 2016 8:11 pm

Sorry this study is taking so long, life ramped up on me a little bit. :chaocry:

Anyways, the data for the experiment is about 5% complete, and I made an interesting discovery that could give an insight on the formula the game is using.

The formula the game is using is almost certainly non-linear.

I decided to test this formula at it's extremes (0 and 65535), as well as 50 away from them (50 and 65485) on the power course. When the chao was at power = 0, the chao completed the climbing section in 13.05 seconds, and when power = 50, the chao completed the same portion in 12.80 seconds, which is a .25 second improvement. The improvement for the chao from 65485 to 65535 was only .02 seconds. So, the function (on a graph of stats on the x axis and time on the y axis), the formula is likely hyperbolic. I know the examples are a bit extreme, but that still means that as the stat grows higher in a chao, even from 0 to 3266, the amount of time it takes to finish the race doesn't always go up the same amount. I'll be working on the study a bit more diligently more often, and i'll let you guys know if any new developments come up.

tl;dr: a jump from 0 to 100 is more noticable than a jump from 3000 to 3100.

-Quickhand413
Until next time! :chaohappy:
Quickhand413

User avatar
Mooncow
Administrator
Administrator
Posts: 1645
Joined: Sun Jul 31, 2005 11:06 am
Motto: Cut your path through an uncertain future...
Location: Chao Island Capital
Contact:

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Mooncow » Wed Apr 20, 2016 2:22 pm

So what you're saying it, you are testing to see if the actual speed of a Chao changes in batches rather than a smooth curve?

So for example instead of the run stat increasing by a percentage with every stat, it may increase in every bunch of 10 or 20 ? Or it may increase per stat or be unnoticeable?

I hope I got that right, if not please feel free to explain in more detail!
Chao Island Twitch Channel for Chao streaming!: http://twitch.tv/ChaoIsland/
I have dragons as my servants and I have almighty powers.
Image
JmTsHaW: (list of CI users, as Sonic Battle characters) Chaos - Mooncow (He barely appears, Chaos also barely appears.)
(00:45:53) xninjy: ur not old mooncow. old is 50 or 45.

User avatar
Mamkute
Moderator General
Moderator General
Posts: 2411
Joined: Sun Jun 19, 2011 6:25 am
Location: California

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Mamkute » Thu Apr 21, 2016 7:23 am

I don't know how I never saw this thread until today. I would have commented on it much sooner. This is an interesting topic, although with a lot of potential testing required.

Mooncow, I think the main goal is to be able to get equations for speed, as a function of stat values, just using the increments as data points. Full on functions may be a bit extreme (and could even be not possible) but something along those lines. (And, at least I assume, under the assumption that even a stat change of +1 would increase the speed.)
Not to put words in Quickhand's mouth.

A few thoughts:
On the topic of hyperbolic, nonlinear increases in speed, I would think testing around the soft cap value, instead of the insanely high 65535 values, should give a more meaningful scale on just how nonlinear speed is (like where the asymptote may lie, past where people can reach normally or not.)

Also, you tested how much a stamina boost increases the speed, which is good to know. I think a good follow up on thought is how speed decreases when the chao runs out of stamina.

On units of speed, what have you been using so far? You gave some numbers when referring to cheer speed increase, but I am not sure on the units.

I think this is a really good project, although as usual, I can not engage in it directly, due to not having PC SA2B. I will definitely like to look at this thought. And I definitely think run is the go to first thing to test for, although slopes are possibly something to take into account as a source of variable speeds.
Image

User avatar
Quickhand413
Newborn Chao
Newborn Chao
Posts: 7
Joined: Wed Mar 30, 2016 2:02 am
Motto: Every question probably has an answer.

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Quickhand413 » Fri Apr 22, 2016 7:50 pm

First off, thanks for your guys' interest, I'm honored to see that you're interested :surprise:

Looking back on some of my posts, as well as my notes from when I took physics, I may have misstated a few things. :thinking:

First off, I am using the increments as data points for an overall function, just as Mamkute said.

I've been mostly basing the study on timing, which to the average player is what they would look to for seeing how "fast" their chao is. The function of everything according to time appears to some extent to be hyperbolic. That being said, it's completely normal for a time function to be this way, since v = d/t. So, I can't exactly rule out a linear velocity anymore. But, if you're racing chao with the objective of getting better and better times, the amount of time shaven off with each increase gets lower and lower.

I've also come up with a bit of a hypothesis on how these functions could be built. If you go time-sided, the function will (hopefully) be something like K(m/(x-b^-1), where K is a constant based on the stat measured (power, swim, run, or fly), m being some sort of unifying constant in the base function, x being the stat value, and b being the time it takes to finish the race at x=0. If velocity were to follow the trend this time function, I wouldn't be surprised if it's just k(mx+b), with the variables following the same definitions.

As for testing around 65535, I just did that to make sure I was on the right track graph-wise, I wanted the most extreme distance in stats to help me prove my point.

I haven't got any solid units for distance, mainly because I don't know of any methods to access them. The simplest way I can see going about this is by counting pixels on a minimap and just putting it in terms of map pixels, which might be a bit sketchy (human error and all). There's probably a memory address for where the position of a chao is stored, but I don't have any idea how to properly memory hack.

Measuring a decrease in stats when there's no stamina left is an interesting topic, but it'll be a little harder to do because chao always have stamina at the beginning of a race, and I doubt stat values can go negative. I have a few ideas, such as running a longer race until you get to a previously measured segment (viable), or memory hacking the value of the stamina to 0 at the beginning of the race (probably a little complex).

Now, I know you're probably thinking it'd be hard to measure the boost in in velocity without distance. Well, since I tested all instances of "boosting" through a course on the same course, the distance over which the boosting takes place is equal, meaning that v(cheer)t(cheer)=v(reg.)t(reg.). After putting in the times, I got v(boost)=1.3v(reg.) (I was quite happy to see the numbers were really clean for an experiment this exact :chaohappy: ). Seeing as formulas tend to be methodical to save space on games, I wouldn't be too surprised to see that running out of stamina decreases velocity by 30%

So, hopefully that clears things up, and if anyone out there can help me find the distance of courses through memory hacking or some other idea, it would be awesome if you posted something on here.

I'll try and be more active in the near future, preferably after I've taken my AP exams. Sorry if I seem like I'm sleeping on the job over here. :sway:

-Quickhand413
Until next time! :chaohappy:
Quickhand413

User avatar
DarkyBenji
Chao Expert
Chao Expert
Posts: 516
Joined: Fri Sep 10, 2010 4:41 pm
Motto: I'm someone that can blow your mind
Location: Darky kindergarten
Contact:

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by DarkyBenji » Fri Apr 22, 2016 9:14 pm

Quickhand413 wrote:Seeing as formulas tend to be methodical to save space on games, I wouldn't be too surprised to see that running out of stamina decreases velocity by 30%
30% ?!

i though it was 80%~85%, i mean if my chao with 3200 on run, run out of stamina, he have the same speed of a chao with 640 run.

maybe it just run :darkblink:
Image
───────────────────────────────────────────────────
YoutubeOther ModsDeviantArt

User avatar
Mamkute
Moderator General
Moderator General
Posts: 2411
Joined: Sun Jun 19, 2011 6:25 am
Location: California

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Mamkute » Fri Apr 22, 2016 10:57 pm

Those are all very good observations, and I see you are a highly mathematical person. Good luck on AP tests Quickhand, I understand your pain (not currently, more like three years ago.) What are they, if I may ask?

More on topic. I suppose race time can only get you so far (compared to physical distance unit) since chao often take weird paths or get shoved out of the way by other chao, whch would make "race length" an inconsistent unit, although I suppose many runs could yield a reliable average.

Also, I asked earlier but this was not addressed, do you know if slopes are any factor in running speed? Those could make measurements more awkward.

Finally, and I know this is a large project, but what do you think of also testing for intelligence as it relates to speed of opening the boxes or getting the fruits (whether or not the chao gets the correct fruit is more a probability based on intelligence though.) And luck is thoroughly not a speed related stat, I suppose.
Image

User avatar
Quickhand413
Newborn Chao
Newborn Chao
Posts: 7
Joined: Wed Mar 30, 2016 2:02 am
Motto: Every question probably has an answer.

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Quickhand413 » Sat Apr 23, 2016 4:53 pm

Well, I was able to do some more testing, and I may have at least a partial answer as to how running out of stamina affects the chao's speed, and Darky may be on to something. :darksurprise:

The only stats I felt I could feasibly test were swim and power, because the beginner's areas were far enough into a Jewel race so I could reach them without having any stamina. I couldn't do the run stat because the pedriot course is the only one with mushroom forest's track in it, and it's right at the start, so my chao would always have some form of stamina, and the fly stat is a beast in and of itself (haven't found any good, drawn out flight spots, and you'd have to take in vertical AND horizontal velocities into account.)

Anyway, the strange thing I found is that the swim stat and the power stat had different effects to their velocity when there was no stamina. When I ran the aquamarine course and got to the crab pool, i noticed that the velocity dropped to .666 of its original value (or 2/3 if you prefer). When I did climb, the numbers were a wider range, but they all seemed to hover around 3/4 of the original velocity. I'm probably going to go back and re-measure the boost in speed when I have more time, but this rabbit hole may go a little deeper than originally thought.

As for the question on slopes, until some sort of accurate distance measurement is discovered, I can't answer that question with any degree of certainty.

As for the AP's I'm taking, they're Chemistry, Calculus AB, English literature, and Macroeconomics. I'm on the "college path" that's at my school.

Until next time! :chaohappy:
-Quickhand413
Until next time! :chaohappy:
Quickhand413

User avatar
Jeffery Mewtamer
Ultimate Chaos Chao
Ultimate Chaos Chao
Posts: 3079
Joined: Thu Jun 16, 2011 3:59 pm
Motto: Lover of all things cute and magical

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Jeffery Mewtamer » Sat Apr 23, 2016 10:14 pm

Wait, do Chao start with a non-empty stamina meter even if their stamina is 0?

I also find myself wondering if there's a way to narrow down the section of executable that runs during Chao races and disassemble that portion of the game's machine code to get the actual formulas the game is using. Making sense of the entire disassembly would drive even the most dedicated hackers insane, but if we could isolate the Chao Race code(or the Chao Karate code for that matter), it might be manageable.
Just so you know, I am blind.

Those who approach life like a child playing a game, moving and pushing pieces, possess the power of kings.

User avatar
Quickhand413
Newborn Chao
Newborn Chao
Posts: 7
Joined: Wed Mar 30, 2016 2:02 am
Motto: Every question probably has an answer.

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Quickhand413 » Mon Apr 25, 2016 8:10 pm

Yeah, chao start with some stamina meter. It's also governed by a function that probably looks like y=mx+b, where the b is the amount of stamina the chao has at stamina=0.

As for the hacking of the formulas directly from the game, I have no knowledge on how to do that myself, but it would definitely speed up the process if we got some concrete formulas. I've been thinking if we can solidify what the velocity equations are from either testing or the program, it would only take some algebra to make a time formula where you could just plug in chao stats and find out how fast your chao would finish a given race. It might take longer than the actual race, but it helps if you're the type of guy that doesn't take chances.

Also, I've been doing more testing on the fly stat, and I believe I'm gonna have to throw out some data points due to them being over different distances. I did a little bit of fiddling around with the stats and I'm going to start collecting data points at fly≥350, because at that stat, (or a stat very close to that), it can bridge the gap in stump valley without falling into the water. 0-349 may be more useful for finding out the descent rate of the chao.

Until next time! :chaohappy:
Quickhand413
Until next time! :chaohappy:
Quickhand413

User avatar
Quickhand413
Newborn Chao
Newborn Chao
Posts: 7
Joined: Wed Mar 30, 2016 2:02 am
Motto: Every question probably has an answer.

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Quickhand413 » Tue Apr 26, 2016 10:07 pm

So, I decided to do some testing on stamina today, because it seemed like a topic that should be covered, especially for those who want to get the most out of their stamina and cheers. I finally have some concrete mathematical relationships to share on this topic, so a) something actually came out of the experiment, and b) there's something you guys can use to start optimizing your chao (I caught wind of something called the Chao Races). I arranged everything under spoiler bars so you don't have to scroll through some huge chunks of text to find what you want (You're welcome :cool: ).

Anyway, down to the math of it all. First off, I'm going to be using units of millibars in the equations (abbreviated mB). In case you couldn't infer, 1000mB = 1 full bar of stamina.

The Actual Stamina Stat, and it's correlation with Millibars
Spoiler:
First off, I'll discuss how the stamina stat relates to stamina in millibars. As I was testing, I tried to find some concrete values where the stamina bar was full, and I finally stumbled upon something great. The relationship between stamina and mB is LINEAR. This means there's a really simple expression that shows the amount of stamina the chao has in mB, and the formula is mB = (500/667)(stat value) + 500. (The plus 500 is explained in the 3rd tab.) So, now we can figure out the stamina that your chao has in mB, which can help us calculate how much stamina we need to complete/destroy a race. :chaohappy:
Stamina Decay
Spoiler:
Finally, there's a linear relationship in this whole mess of math. Stamina decay is nice and simple. It doesn't changed based on your actual stamina stat (besides running out later rather than sooner). However, the medium the chao is in changes the amount of stamina used in the activity. The run one is nearly spot on, seeing as there was a course long enough to test the rate until the chao slowed at 0 stamina, but the others might be a bit messy, due to the fact that all I had was a ruler and a short time interval :chaoangry: . So, the rate of stamina decay for running is .2sec/mB, or 200 seconds per full bar. The rate I found for Swimming that I found was approx. .58sec/mB. The climbing rate is the slowest decay of them all, at 1.46sec/mB. I haven't got an equation for fly mainly because the max time interval for flying is around 4 seconds, so any stamina loss there can almost certainly be considered negligible. If anyone wants to check my math, by all means do, these figures may be inaccurate.
mB of Stamina at Stamina = 0
Spoiler:
So, considering we have some solid rates of decay for regular stamina, we can easily find how much stamina is in the gauge at stamina=0. I decided to do the Pedriot course because it was all running, and my chao ran out of stamina at precisely 1:40 into the race, or 100 seconds in layman's terms. Since stamina decays at a rate of .2sec/mB, the chao starts with a generous base of 500mB. So, if your chao doesn't have much stamina, it can likely finish almost every race without running out (provided you don't cheer it on).
Cheering Decay
Spoiler:
Cheering decay is probably a factor that will be most paid attention to for people who want to shave time off a chao's personal best. I tested this idea on the beginner's courses, and accross the board, it took 5 cheers to deplete (or almost deplete, blue border's got me there) the stamina gauge at stamina=0. So, for all intents and purposes, the amount one cheer uses is 100mB. The boosting rate also varies from medium to medium, but by a much smaller margin. Again, fly isn't included because it gives me major headaches figuring out. A cheer for a running chao lasts approximately 1.30 seconds, give or take a few hundreths, so the rate is 1mB = .013sec. The swim rate is slightly more forgiving with 1mB = .016 sec, and the power rate is the most forgiving at 1mB = .0205 sec. Again, the numbers may be a bit inaccurate, but they're the best I can do.
To sum it all up, plus equations
Spoiler:
The idea of stamina is probably one of the simpler ideas in chao racing, but it's still quite complex. I'll update you guys if anything else comes out of it, but let's get to the actual equations. To find out how much stamina a chao uses in a given period of time, the equation is S=MC(Tf-Ti), where S is stamina in mB, MC is medium constant (found in the decay sections), Tf is the ending time, and Ti is the initial time. As for boosting, S=CMC(Tf-Ti), where CMC is the cheering medium constant. Now for the real kicker. If you want to find out how much you can boost in a race, just find the stamina in millibars, the stamina required for the race, and put it into this equation:
Boosts = (S(total)-(S(race))/100. You could try further optimizing your run by factoring in the time you spend boosting, but considering the rate at which stamina decays cheering on your chao, it's unlikely you'll be able to eke out another boost.
Hopefully you guys like this discovery, and use it well!

Until next time! :chaohappy:
Quickhand413
Until next time! :chaohappy:
Quickhand413

User avatar
Quickhand413
Newborn Chao
Newborn Chao
Posts: 7
Joined: Wed Mar 30, 2016 2:02 am
Motto: Every question probably has an answer.

Re: [SA2B] Relationship between Chao Stats and Velocity (Ongoing)

Post by Quickhand413 » Sat Apr 30, 2016 11:44 pm

Hey guys,

I'm going to be on hiatus for the next couple of weeks due to my APs. I might lurk the forums a little bit now and again, but don't expect any data or breakthroughs for a little while.

When I get back I'm pretty sure this study will be going better than ever thanks to some extended free time for me, so enjoy the stamina post until I get back :surprise:
Until next time! :chaohappy:
Quickhand413

Post Reply