Bisection Search Like A (Human) Boss

Bisection search, or binary search for us developers, is a technique for finding the best value within a given range of values. This post describes tips for when you need to bisection search manually by hand (by “feel”), as opposed to when it can be automated by, say, a computer algorithm.

Bisection search, or binary search for us developers, is a technique for finding the best value within a given range of values.  Technically speaking, Wikipedia says the “bisection method in mathematics is a root-finding method that repeatedly bisects an interval and then selects a subinterval in which a root must lie for further processing.” This post describes tips for when you need to bisection search manually by hand (by “feel”), as opposed to when it can be automated by, say, a computer algorithm.

For example, say you’re very thirsty and need water fast so you pour yourself a glass of water: Pour too fast and it spills but too slow and it takes too long. You want to pour fast enough to quench your thirst as soon as possible but not so fast that it spills. The speed of pouring is your range of values (eg. slow to fast) and the consequences of the speed of pouring (how long it takes and if it spills) are your criteria to decide the best value. You try pouring the glass slowly and it’s too slow: Pour faster. You try pouring the glass faster and it spills: Pour slower but faster than the first time. You try pouring the glass “just right”: It’s fast enough and doesn’t spill. You’ve found the best pouring speed by bisection search!

Update 2017-10-26: Added sections: Bisection Hacks, and Case Study: Tuning Force Feedback Parameters in GTR2 – FIA GT Racing Game.

Continue reading “Bisection Search Like A (Human) Boss”

How much FFB can you feel in GTR2? 1/1000th of a percent.

[This is a repost of a thread I started on RaceDepartment.com and just wanted to have on my blog, as well.]

I thought the GTR2 fans would find these results on the precision of GTR2 FFB interesting. For the record, I run a SimXperience Accuforce direct drive wheel. Precision probably wouldn’t be as noticeable on belt/gear wheels.

I’ve been tuning force feedback and recording details on my blog and, in any game where I need to tune value ranges, I find myself doing bi-section searches and testing the result to find what suits me best for a particular FFB parameter.

Here’s my latest testing on this parameter in the UserData PLR file:

FFB steer force grip weight=”0.71696″ // Range 0.0 to 1.0, recommended: 0.4 to 0.9. How much weight is given to tire grip when calculating steering force.

Note 0.71696 is basically 71.696% given the 0.0-1.0 range. GTR2’s PLR files apparently have a precision of up to 5 decimal places or 1/1000th precision thought of as a percentage.

How did I end up at a super specific value like that? Well, here’s the bi-section search it took me to arrive at that value:

FFB steer force grip weight=”0.78000″, 0.785, 0.7875, 0.6875, 0.7875, 0.6875, 0.7375, 0.7125, 0.725, 0.71875, 0.715625, 0.7171875 (better), 0.71640625, 0.716796875, 0.7169921875, 0.71689453125, 0.716943359375, (0.7169189453125+ vs 0.7169677734375++), 0.71695556640625 (*, **, ***)

Yes, at every step I could tell the difference (note the “better” notation, and the “+” and “++” notations). I was choosing what gave me a better feeling of grip level while cornering.

Those last two values were (when rounded) really 71.697% and 71.696%: A 1/1000th precision difference that you could feel in the wheel.

Some might be skeptical, I understand, just be aware this is really only perceptible when you’re going hard like say for fastest lap in a qualifying session. Precision of ffb matters at that point.

Personally, I find it really fascinating to push an old game like GTR2 from 2006 this far and find out it can deliver that kind of fidelity on a modern direct drive wheel.

*Yes, to update those values I have to exit GTR2, edit the PLR, and start GTR2 back up again. A real pain but worth it when you start to feel the car as it was meant to be felt.

**My “bi-section searching” deviates from a strict bi-section search in that sometimes I experiment and try values that aren’t strictly a bi-section the previous two values. I find this can help when I’m frustrated with the feel and need to find my bearings with a bigger jump which I then narrow down again with a regular bi-section search.

***If you’re interested, I’ve attached my PLR so you can see all my modified FFB values. The car was HQ F575 GTC and the track was HQ Brno. I run 60hz vsync.

Credits

Directly Helping the Poor and Needy #TimCard #Charity365

That awkward moment… when you see a panhandler at the intersection as you’re driving your daily commute to and from work. Each and every day, the same man or woman for a few days or weeks at a time, then maybe a different person for a while, there most days of the work week, and most days you hope to avoid them or to avoid eye contact, at the least. A few more intersections, then you’re home free – for one more day…

‘Lord, when did we ever see you hungry and feed you? Or thirsty and give you something to drink? Or a stranger and show you hospitality? Or naked and give you clothing? When did we ever see you sick or in prison and visit you?’ -Matthew 25:37b-39

That awkward moment…

…when you see a panhandler at the intersection as you’re driving your daily commute to and from work. Each and every day, the same man or woman for a few days or weeks at a time, then maybe a different person for a while, there most days of the work week, and most days you hope to avoid them or to avoid eye contact, at the least. A few more intersections, then you’re home free – for one more day…

And you feel a little guilty, but it quickly fades away once you reach your warm home, familiar family and friends, and your safe bed, and your peaceful sleep…

Until your next commute…

Continue reading “Directly Helping the Poor and Needy #TimCard #Charity365”