The biggest question for DIY investing is your equity to bonds allocation based on risk tolerance and need to take risk.
Can anyone point me into an algorithm of how to do this?

The boglheads AA wiki page didn't seem to give anything specific on how to work this out (or maybe I missed it? but I don't think I did).
The problem with the vanguard online tool is that it's a bit of a black box - asks you questions and spits out an allocation with no information of how it came up with that number. I'm looking to actually understand how the allocation changes based on each aspect.

You can play with the Vanguard tool and make small changes and see how the recommendation changes. If you really don't know where to begin, begin with 60/40 and adapt to your personal situation and feelings or simply stick with it [Vanguard Balanced Index Fund Admiral Shares (VBIAX)]. Or tailor it as you please with any of these 149 other choices that may be just as good for you.

There are numerous risk assessment questionnaires out there to help you determine an appropriate asset allocation. From what I've seen they all contain the same or similar style questions. Be honest in your answers and they should help you dial in an appropriate AA.

Income is not wealth. Wealth is not income. Both are equally as important and either is capable of producing the other.

In terms of risk, begin by figuring out the minimum amount you need to protect. Put that amount in safe investments, such as TIPS, bonds or cash, whether it's 5% or 95%.
+ 100% of the amount you plan to spend in the next 5 (to 10) years, such as a house down payment or college expenses. If you are retiring soon, the amount you'll need for 3-8 retired years.
+ At least 3 months of minimum income, in addition to your emergency fund. If you have reason to be cautious - family, uncertain job, health issues - make it 12-24 months.

That's the minimum amount that you, personally, need to protect. It can be much higher. Although, don't be so conservative that inflation destroys your capital.

A good question but very hard to answer for oneself and even harder for someone else. One guide that helped me a bit was suggested by a former Boglehead. Take the percentage that you can afford to lose, double that and make that your equity allocation.

I assume that is based on the general idea that there will be several times in a lifetime where equities are likely to decline by that amount. Your risk tolerance is really hard to understand and it easily gets fooled when times are good and suffers deep regret when times are bad. Sometimes you need to actually see your nest egg plunge 20 or 30% to fully appreciate risk which presents itself in dollars lost not percentage declined and if accompanied by a content drum beat of bad media.

I suggest it is better to use a modest equity allocation until you have experienced how you feel/react to a decent plunge.

I have a good imagination, so I just pose scenarios to myself and try to make it feel as real as possible. "Suppose the stock market fell 50%. What would I do? I imagine the news reports, the bogleheads 'Stocks in freefall' threads, etc until it feels real. In my mind 50% is the worst case scenario. Any lower than that and I would probably be eager to buy stocks.

If the answer is to trade anything, then I keep reducing the stock exposure until I respond to myself "I don't do anything, I don't care about that amount of loss".

The more difficult question is if you have major expenditures coming up in a matter of years - house purchase, etc, that doesn't give you the needed time horizon to be in stocks with that money.

You can play with the Vanguard tool and make small changes and see how the recommendation changes. If you really don't know where to begin, begin with 60/40 and adapt to your personal situation and feelings or simply stick with it [Vanguard Balanced Index Fund Admiral Shares (VBIAX)]. Or tailor it as you please with any of these 149 other choices that may be just as good for you.

We have suggested as a fundamental guiding rule that the investor should never have less than 25% or more than 75% of his funds in common stocks, with a consequence inverse range of 75% to 25% in bonds. There is an implication here that the standard division should be an equal one, or 50-50, between the two major investment mediums.

I like his standard division. I've adopted it. It's simple and good enough for me. Now, I can put my time and energy elsewhere.

Yes the double the amount of your panic-point and keep that as your equity allocation is something that makes a lot of sense to me and I have heard that before. Seems like a great starting point.

@Phineas J. Whoopee
Thank you, I have seen that post from you before, and yes certainly light years ahead of "age in bonds"

@FiveK

The link to the Larry Swedroe article was excellent, thank you. This is more what I was looking for - something going into a bit more depth of how to determine your each of your ability, willingness and need to take risk separately, and then put them together, which I assume is what an advisor would do to help you determine your AA.