__A Theoretical Algorithm for Deciding Bail__

A quick look into creating a computer algorithm for deciding bail for someone awaiting trial. Written for Tech Roulette 2021, P4M2 - Justice Matrix

Published: 2021-07-10 GMT; Updated: 2021-07-10 GMT; Authors: Clayton Hickey

This article is written for the second module of Tech Roulette 2021, Justice Matrix - Project 4. As stated in the module description, bail is decided by a judge based on the risk of them escaping, crime alleged, and the of them to others/community. The goal in this article is going to be to assign values to go over how to assign values to each of those points and how to put them together into a final cash value. This theoretical algorithm is going to attempt to be unbiased, but obviously, that is not something that is going to be successful as the processing for deciding bail is inherently biased.

## Weighing Crime Alleged

For this algorithm, I'm going to make the crime alleged a multiplier that is applied to the final value. For when multiple crimes are alleged, their multipliers are added into one multipler. A list of all possible charges and their associated multipliers would be supplied to calculate this. I imagine for crimes like murder (at least voluntary), crimes relating to extreme dehabilitation or mental damage to others (like rape), and terrrorism that multiplier would be set at Infinity (would not actually be stored as infinity in practice - probably an Rust-like enum) - meaning that no chance for bail is offered. If someone has been charged for the same crime in the past, the multiplier for it is multiplied each time by another value set by the database for the specific crime. Optionally, the multiplier for each crime alleged could also be multiplied by another algorithm (or user-supplied if that's allowed) to estimate the chance the defendant actually committed the crime. This gets us out value of estimated_pressure.

## Determining risk of escape

In my mind, there are 3 types of escapes. Those where the defendant is found easily like after a week or two, those where a search party and ongoing investigation must be conducted to find them but they are eventually found during the search (not given-up), and those where the defendant is never found. Each of these will be calculated to a chance percentage to be used in the final calculations. Defendants generally cannot escape effectively without the help of another person. So, in order to calculate these, the algorithm will go through each of the person's connections and choose the connection who would give the highest value for each. For each connection, their ability and willingness to help for each type of escape must be calculated (as percentages) and then averaged (for a more complex algorithm, groups may also be taken into account). The ability for a connection to aid in each type of escape varies. For the most basic type, a common scenario I'd imagine would be to keep them in their home. Factors that could go into whether one'd be able to do that could would be how much money they make in excess, how much time do they spend working, do they live with family, do they live with a significant other, do they live with children, and do they have the ability to transport them w/o people seeing. These factors could be run through another algorithm/sub-algorithm to determine the percentage. This same strategy for calculating ability would be applied for the other types of escapes. For the second type of escape that requires an extended search, factors I'd think would be if they have other property not connected to their home they could hide them, how big is that property, how easy is it to track that connection themselves, do they have the ability to move them around, and similar factors from the first one. For the third where they're never found, factions I'd imagine include do they have connections with other governments, do they have passports to other countries, do they have access to private air/sea travel, could they abandon their current livelihood with the amount of money they have, and other factors from the previous. Willingness goes through the same process but has more concurrent factors like could this person forgive the alleged crimes, are they family/friend/other, has this person commited similar crimes, does this person have a life/family that they wouldn't want to abandon. After this has been done, we are left with 3 percentage point chances for each degree/type of escape's success. However, I want to go one step further and take into account the defendant's willingness to escape for each degree. To do this, we take potential_years_free for each, add potential_years_sentenced, subtract potential_added_years_if_caught, divide it all by estimated_years_to_live, and clamp it between 5 and 100% for the percentage chance of each degree. The final variable I want to get out of this is a high bisaed estimate for how long they may escape cut by chance. To do this we take the maximum of these three operations that convert each percentage into a duration (years): chance_degreee_1*3weeks, chance_degree_2*8months, chance_degree_3*estimated_years_to_live. This gets us our value of estimated_years_escaped.

## Determining dangerousness

Dangerousness is a hard thing to quantify but the unit I'm going to use in order to reach the final cash amount is about maximum damage per year. We can ignore any cases where bail would be denied due to the crimes alleged. I think a decent way to base this off of is potential_years_sentenced*estimated_damage_done_in_crimes_alleged*estimated_crazy_level. This leaves one value for me to approximate here: estimated_crazy_level. Essentially, this value is supposed to represent the number of damages a person would do in a year if put at maximum stress due to mental issues/disorders. To calculate this, a similar process would be done like weighing crimes alleged where a table of mental disorders and their associated crazy-ness value is created and the defendant's disorders are simply added up for the final value except for this, they're not added to 0, they're added to a base number that would have to be determined to account for those without mental disorders. All values would likely be determined by statistical analysis which may introduce biases (update: This method of calculation doesn't sit right with me and I think it's actually illegal so...). However, with this, we get our value for estimated_amount_of_damages_per_year_free.

## Putting it together

The final formula is pretty simple. We just multiply all of our values: algorithmic_bail = estimated_pressure * estimated_years_escaped * estimated_amount_of_damages_per_year_free. Again, this is not expected to be a perfect algorithm devoid of biases, but it's the best I could come up with on a Saturday afternoon.