Yearly Archive: 2022

A definition of reality

We should start from the premise that we operate from the point of view of self-preservation. This would be preservation of the immediate self, but also preservation of offspring and peers as a reflection, since they also represent a vehicle of the self into the future. Then, our existence is contingent on our ability to predict the future. The better the prediction, the better are the chances to stay alive and to project our own existence. "Will I be alive tomorrow if I stay into this cave ? Will I cripple myself if I walk barefoot on gravel ?"

Any prediction requires two elements:

1) Prior knowledge, the more the better.
2) Analytical tools to reliably derive an outcome from that prior knowledge.

To be efficient at this, we need to be able to process information in the most deterministic way possible. This means that the most valuable information is information that we can put through our analytical machinery (the brain, or any other sufficiently powerful calculator), and that can lead to a useful forecast of a given event.

The keyword here is "determinism", something that requires a level of rigidity that may be challenging for a human brain. This is actually where digital data storage, math and digital computers can help greatly.

The scientific method is also built on the concept of determinism. If you can consistently use prior knowledge to determine a future event, then your actions are useful and deserve more exposure. If instead a theory cannot predict the outcome, then the theory has no practical value. Of course the inability to prove something doesn't mean that a theory is necessarily invalid, but for all intents and purposes, one simply cannot rely on a formula that cannot forecast an outcome.

One could think of a deterministic structure as a web of points of determinism. A graph where each node is connected to other nodes. The more the connections, the more reliable is a certain fact established by that point of determinism. Nodes at the fringe of the web, with virtually no connections to others, must still exist, otherwise there would be no progress, but they are less reliable, because they have less support than the better interconnected points.

Image courtesy of Simon Cockell

The network structure is pervasive in nature, and it's how our brain is built. This structure is also what reality is to us: things are more or less real, depending on how well we understand them, meaning how well they relate to other pieces of data, with the goal of making useful predictions. The moment in which such structure comes less, it's also when reality dissipates. Reality is indeed a structure.

Going beyond definitions. Once we establish all this, it should be clear that to have any kind of success at any level, one is better served by leveraging determinism as much as possible (unless "success" is defined by self-destruction, but that's uninteresting and easily obtained).

In practice, establishing a robust level of determinism can be very difficult. The difficulty of establishing a clear logic connection between concepts can vary wildly. This depends on the amount of data at play and the process of analysis required to interpret those data. Most complex subjects are filtered through the lens of experts, which use their skills and experience to reduce complex subjects to a simplified form that can be easily digested by the non-expert. Experts however can often disagree on fundamental issues, hopefully in good faith, but sometimes in bad faith, too. On top of that, communication of the synthesized concepts usually goes through additional levels of simplification and bias. For larger issues, experts defer their communication to technical leaders, political leaders, public-relations, editors and finally journalists/writers.

Putting potential malice and communication issues aside, there's an inherent problem of complexity. Some fields necessarily rely on complicated statistical models to attempt to establish cause and effect while operating at a level of knowledge that is not very detailed.

Medical trials are a good example of an attempt to establish determinism from a very complex system (the human body) that in some cases one has to treat as a black box. A "black box" being a system that generates an output for some inputs, although the user doesn't completely understand the complex mechanics that make the box work. With medicine there may be a general understanding of the benefits of certain elements on the human body, but there is also hidden complexity of the system that forces researches to take a trial-and-error approach, usually starting from other, more expendable, living creatures.

The concept of "black box", stylized

Another problem with establishing determinism is that too much reality hurts. Suspension of disbelief is a necessary tool for survival. It's necessary against the nihilistic picture that naturally arises from thinking about existence. Imagination is essential both to cope with reality of existence, and to expand the vision of reality. At the same time, imagination can easily be abused to the point of becoming counterproductive.

In my opinion, while it's essential to keep a grasp on the better established aspects of reality, it's also important to let the mind run free, and to occasionally listen to "the crazies" (see "Adopt a conspiracy theorist"). This is a good mental exercise and also a reminder that reality is a dynamic concept. To push this to an extreme, in some ways, the person that cuts his arm looking for an alien microchip, may be closer to the universe than the person that wakes up at 8 in the morning to go to the office for 40 years. The schizophrenic has less ties to the common concept of reality, but our common concept of reality is also infinitesimally limited in the context of the greater universe.

A less extreme example of lateral thinking is that of religions. The modern educated man deride religions and the concept of a God, as some silly coping mechanism, however the fundamental questions that religions attempt to address never went away. One may decide to ignore those questions for a while, but they keep coming back. This is why nowadays theories about living in a simulation are so popular, it's just a modernized version of religions. It's a framing that has a better grounding with our map of reality, one that includes more advanced reasoning tools, but it's a framing that also validates the fundamental pursuit of ancient religions. In fact, the "simulation theory" could easily become the basis of new religions, where God is no longer an old man living in the clouds, but a game developer that clicks on you and checks your status from time to time.

"Little Computer People" on the C64

In conclusion, it's safe, efficient and productive to rely on the better established areas of the "reality network", but it's also important to keep in mind that there is a virtually infinite potential to explore and expand that structure, and that our point of view is extremely limited. Finding the right balance is the hard part, as with everything. Stay at the center and you're golden, but you're going to live a derivative life like any working bee, move too far to the edges, and life can become a mix of fantasy and paranoias. May the most balanced player win !

Below, a tribute to Terry A. Davis, a fellow programmer that was definitely living on the outer side of the network.

Simulation: from weapon systems to trading

When I first became interested in algorithmic trading, I didn't have any kind of trading experience. I did however have some very limited experience with flight simulation and weapons systems as an evolution from working in game development.

Although I didn't know this at the time, simulation is just about the most important thing when it comes to developing trading strategies.

In weapon systems, simulation allows to estimate how reachable a target is. This can be used either to extrapolate fundamental formulas to be applied in real-time, or the simulation itself can be executed in real-time, if a weapons system has enough mobile computing power.

In the first case, simulation can help to build tables of parameters for quick retrieval when a weapon needs to be used. Let’s say that one has a cannon with a new kind of ammo. A well-established analytical solution can be adapted for the new ammo. But for more complex cases (i.e. different aerodynamical profile of the projectile) a computer simulation can find a more precise solution. A machine learning system can try millions of possible variations of parameters, such as elevation of the gun and amount of propellant, find the best possible one for given distances, and build a table that can then be consulted when the time comes to use the cannon to hit a target at a specific location.

Below is a ballistic table used in World War 2:

WW2 ballistic tables courtesy of tankarchives.ca

Here's an interesting explanation of bomb drops procedure in Vietnam using a F-4, which didn't have a computer for the task.

In the second case, a more advanced weapon system, let’s say one in a modern jet fighter or in a modern tank, could forgo with most precalculations and instead have the simulation running live. The benefit of this second solution is that it can adapt to more variables and it can improve with a software upgrade.

In practice, setting up a simulation that is accurate enough to replace most of the experimental work, is not a simple thing, unless one is already developing a simulation, such as a flight simulation game. When the time came to build a believable weapons system in my experimental flight sim, it was only natural to use the simulation logic already developed for the game to calculate the launch envelope for a bomb or a missile, or the homing guidance for a missile.

Why manually extract a formula, when you can simply use the already existing simulation engine to test thousands of trial-runs and find the best parameters for the optimal launch envelope ? This was my epiphany in regard to the power of building a simulation to solve problems in a more generic and simpler way. Once you have a simulation for something, then you can use raw computing power to search for the best variables, whether that’s to built a table to consult at a later time, or whether it’s to be used actively up to the point of launch of a projectile, or even during flight of a guided missile.

Practical application of simulation in the real world is probably something in between. Supercomputers can be used to analyze more complicated matters such as the aerodynamics of a particular kind of fins of a missile, while on-board computers can work on launch envelopes and homing guidance. For sure, once a problem is shifted into software, chances for improvement increase sensibly.

This does connect neatly to algorithmic trading and how fundamentally dependent it is (or it should be) on the concept of simulation. No sane person should ever attempt to trade without first having a computer model. Some may disagree, but I can’t imagine how having an analytical model would hurt success.

The only drawback would be the issue of the reliability of a computer model of something that is very stochastic in nature. A weapon has little room for error. Simulating a projectile may be difficult, but the outcome is immediate and straightforward. With trading, instead, success can only be found in odds with large numbers in an highly dynamic setting. This makes the process of optimization more difficult and often counterproductive, but this is a discussion for another post.

Women and children

In 2022, war is now truly a live event. With cell phones, body cams and quad-copter drones, social media is filled with an abundance of the most disturbing footage that one can imagine.

This is certainly shocking from the perspective of societies that have lowered the bar for conflict to that of verbal micro-aggressions. At the same time, this is also very educative. It's a perspective into what humans are and can be (see also "The explosive 'boredom' problem of civilized societies").

I see interviews of people living underground and struggling simply to stay alive and find water and food, and I think of what I pictured from the WW2 stories from my grandparents.

Image courtesy of Alexander Turnbull Library

Everything checks… that's the war I've been hearing about, a war where human cost is obvious, one that feels close enough, because it's not happening to the third world. We're used to ignore the homeless in the streets, but if it's someone that looks like he has a job like us, then that's a different matter. Affinity with race also helps a lot to mobilize millions of voices on Twitter. As much as we can pretend that we don't care, we all instinctively feel more empathy towards living beings that look more like us. Our level of empathy and altruism varies in a continuous scale from two extremes, where most affinity is generated by our own children, and least affinity is probably some sort of alien insect coming from another galaxy.

Another major reality check from this war is how biological gender suddenly matters. Although some women are involved, they are very few and are usually relegated to being snipers, the kind of activity that requires less direct conflict. Most women are instead grouped with children and elders, while men are actually forced to go in combat, at least from the Ukrainian side. I think that we can safely assume that when shit truly hits the fan, the gender equity construct that has evolved in western societies goes straight into the pooper.

One could say that if there were no wars, then men and women could almost become interchangeable, but to expect a natural world without conflict is even more utopic than to expect a natural world without biological predispositions. Those that seek total equity for humanity have a better chance looking for it in the after-life, or in some fictional far future where any form of individualism is crushed together with all major human traits that make us what we are.

Meanwhile, in the real world, it would be wise to keep in touch with reality, because sooner or later the protective shield under which we are born and raised, will falter, and at that point understanding human nature will become a matter of survival.

An actual phobia, for a change

I'm not a fan of the "phobia" suffix. I think that it's easily abused these days.

One classical misuse of "phobia" is with the term "homophobia", as if straight men had nightmares of being chased at night by a cosmopolitan gay man holding a pair of sharp scissors !

Jokes aside, the presumed fear in this case would be that of the potential for straight men to find out that they may actually be attracted to the same sex. The idea is that it would be some sort of fear of the unknown. Calling someone an homophobe is an attempt to paint that person as unrefined and uncultured, someone that dismisses same-sex intercourse instinctively, someone that has not evolved to the point of going beyond his natural instincts, and that is afraid of doing so.

That is some cheap psychology that unfortunately has become mainstream and has indeed helped to put straight people on the defensive. This is the kind of propaganda that drives many men to pledge some kind of allyship just to look more socially aware.

Now for an example of an actual phobia, these days I'd put Russophobia on top. I'm impressed by the amount of people, especially in the United States, but apparently also in some countries in Europe, that suddenly appear to be fanatically anti-Russian. The 80s are back, with a vengeance !

The reason why I think that this is a legitimate phobia, is because the hate that is displayed is borne out of actual fear. Deep inside, these people realize that Russia is a force to be reckoned with. Russia is a country that even after the fall of the Soviet Union has continued to develop its own technology. This is most notable with aerospace engineering and weapon systems. I'm a big proponent of developing your own technology. In my case that would be software technology, but that's truly essential when it comes to tech that is vital to the security of a nation.

At the same time, the Russian culture hasn't been as softened as in the west. The average Russian is culturally more resilient to the concept of a full-scale war. The human cost that Russia is paying is unthinkable for the average American or European citizen. This is shocking for a population that has been so detached from conflict and that has a relatively comfortable life. A life so comfortable to the point in which public discourse has shifted towards complicated social and environmental issues that are not as consequential as they are made out to be.

Photo by Matt Hrkac/Flickr, CC BY-ND

Perhaps the most important source of this phobia is the realization that the current generation of US and Europe military have little experience with conflicts that are not asymmetrical. Simply put, America has been picking fights with 3rd world countries, bombing them to smithereens with virtually no opposition, and with no real repercussion for civilian casualties. I'm not going to say that any war is easy, but I'm sure that it's a lot scarier when your opponent also has tanks, jets, drones, cruise missiles and everything in between.

It should be noted that technology isn't simply about developing the smartest bomb or the jet with the coolest AR helmet. Technology is also essential in optimizing production of such weapons, as well as building systems that are resilient and don't require too much maintenance. F-22s and F-35s are fantastic on paper, but they are very expensive to produce and they tend to waste precious time on the ground for continuous maintenance. I'm sure that a similar argument can be made for other vehicles of the west vs those that are Russian-made.

The American and European population is scared of an adversary that isn't from the 3rd world. Meanwhile, the "emperors" that pull the strings of those respective regimes, are afraid to be found out as having no clothes. The survival of the elites of the west depends on the population to believe that those elites are virtuous, strong and powerful, but at the same time they cannot ask to their people to accept casualties, because they now live in a soft world, a world where every dead service...person is a tragedy.

The fear is real, and it's not misplaced. Hopefully the people will move from the stage of fear into one of acceptance, and will perhaps wake up from whatever dream they've been pulled into. Unfortunately it's in the human nature to wake up only when it's too late. A lot of people will have to suffer very grave conditions before they finally stop believing the cheap Hollywood action-flick narrative that they have been fed for decades.

What’s your vote really worth ?

When the time comes for some major political elections, there's always a big push to "get out and vote". A big deal is made about how every vote counts, and how if you don't participate, someone else will vote for you, meaning that the vote from others will have relatively more power. For example, in a pool of 1 million voters, if you don't cast your ballot, each voter will have a stronger impact, albeit by a mere 1 millionth of a vote.

Voting is pushed as empowering and individualistic. In reality it's a completely statistical issue. Your own vote by itself is irrelevant in the context of millions of other votes. From a purely individual point of view, you may or may not cast your ballot, and the outcome of the election will be exactly the same for all intents and purposes. No butterfly effect applies here.

To make a pop-science analogy, this can be seen as some sort of poor-man's quantum superposition. The voting booth can be considered as a closed system, where anything that happens there has no effect on the outcome of the election. The "you" that votes A, B, C or abstains, can coexist with no practical effect to the outside, all because of the extreme dilution of a single vote.

There is some value however in the intent to cast a vote in a certain way, and that is to apply self-reflection to have an estimate of the outcome of the election, at least as far as your own demographic goes. That in itself is not a greatly applicable knowledge, being in itself only a guess of a portion of the voting population, but it's more consequential than actually casting a ballot.

To me this is interesting as it highlights the duality between perceived direct decisional power and actually usable power. We're sold the idea that we have a say on things as active participants, while in reality the only true power resides in the ability to self-reflect and predict the direction of a herd, but even that is not something that is directly applicable in most cases (maybe guess how the markets will react the next day ?). The greater power is that of introspection. The act itself of realizing and reasoning over the actual practical effect, or lack thereof, of voting, is further knowledge into understanding the place of the self amidst a collective.

If the power structures were honest, they would plainly state that civic duty is not about casting a ballot, but it's actually to behave like a statistical sample. It would not be a good civic duty to behave as an observer of yourself and to act out of left field, driven by some sort of superego. It's a good civic duty instead to act predictably, as it makes things easier for the manager class in the governmental institutions, as well as for the private ones.

In practice, one could still go and vote, but at least, as a thought experiment, it's worth considering why the actual practice of casting a ballot is not an act of free-will, rather it's a statistical sampling of a collective mind that is an amalgam of popular culture shaped by mass media.

DuckDuckGo cheated on me. I’m now dating Presearch

I recently moved from DuckDuckGo to Presearch.

The reason for the move was the announcement that the engine would filter results to favor a specific party on the Russia - Ukraine conflict.

Last year DuckDuckGo did already show its cards with "woke" discrimination of potential employees, where they'd favor less skilled employees as long as they had enough melanin in their skin and relatively uncommon sexual preferences.

DuckDuckGo supposedly still shields its users from being tracked for advertisement, but I think that most users went in expecting relatively unbiased results.

It should be noted that, as far as I understand, DuckDuckGo itself is a little more than a customer of Google and other major search engines. In practice, DuckDuckGo simply buys search engine usage from Google. For this reason, it was always a temporary solution, because Google's bias its already built-in in the results, plus they could pull the plug at any time, transforming DuckDuckGo into a sitting duck. Remember: if you don't build your own technology, you're just a power user.

Presearch looks more interesting, it's decentralized, it has its own search engine and also allows to quickly select other classical search engines.
Presearch was founded by people that already years ago had issues with Google's search engine result manipulation (see: "Google Penalizes Local Businesses On City’s ’Shop Local’ Website"), so, hopefully the founders are in it for the long run.

It's important to keep in mind that Presearch is just another offer. I don't plan to get married to it, but my time as a user is better spent on a new interesting decentralized project, than supporting DuckDuckGo, which is no more than a gate keeper.

On the Moon landing

In a previous post I reasoned on the importance to entertain the wildest theories and to listen to those that propose them.
I truly believe that it's important to keep an open mind, either to learn something new or as an exercise on how to find holes on such theories. It's all brain food.

I was recently listening to an interview to a relatively public figure that would normally be labeled as a conspiracy theorist. At some point, the subject of the 1969 Moon landing came up. Unsurprisingly, the interviewee was skeptical about it.

The general reaction of most would be that of disbelief, with an immediate rejection on the basis of pure reverence of NASA as an organization, but I don't think that that's enough. As I said, I think that it's a good mental exercise to try and find why certain claims can't be sustained, even if the conclusion is probably the same as the mainstream belief. Forming your own reasoning is a valuable experience, something from which new tools for reasoning can be acquired.

Onto my defense of the Moon landing, the simplest validation that I can think of is the argument against the visual effects that would have been needed to simulate a different gravity while filming on Earth. Believable representation of different forces of gravity has been the hardest thing to do in science fiction for many years. It has basically been impossible until we achieved photorealism in computer graphics.
Some say that Stanley Kubrick did that well in "2001: A Space Odyssey", but that's an exaggeration. The film was exceptional in many ways, but the visual effects used in it are a far cry from what's seen in the broadcast of the first Moon walk.

The reason why low gravity VFX took decades to start to become believable is due to our innate ability to judge certain physical phenomena. Our brain is wired to recognize dynamics, in fact we are naturally excited when we see movement, collisions, explosions, even rag dolls, because we can instinctively recognize the realism of the physical world.

I don't know to which degree our ability to recognize and appreciate dynamics is innate or learned. For sure, we show awareness from an early age, and it constitutes the bulk of child play. This also gives us the apparently uncanny ability to recognize a friend from afar and from behind, if he's simply walking.

It's very hard to trick the brain about dynamical phenomena. Any sort of wired complex rigging that would have been required to simulate low gravity on video in 1969, would have looked unnatural if not downright silly.

That's my reasoning on the subject. It's not a sophisticated approach, but I think that is one that has possibly the best ratio of believability and relatability vs the amount of time invested in research.

Happily ever after

One year ago I wrote the "My Space !" blog post, where I was giving my reasoning for leaving social media, meaning Twitter, Facebook and Instagram.

I erased my Instagram account, since I had truly no use for it. I kept my Twitter and Facebook accounts as a notification tool, to post links to content about my trading system and my blog posts. Eventually, one day I'll stop doing that as well.

At the time I downloaded a backup of my Twitter and FB feeds. The backup was easy to obtain, erasing years of history however is a different matter. It was easy on Twitter, but on Facebook it turned out to be a multi-day effort.

Last year, the only option to erase FB activity in bulk was to download a Chrome script that would emulate manual deletion of the timeline, one item at the time. On top of that, because the plug-in relied on an older FB design, I had to use a plug-in to also transform the UI of FB to an older version. The operation was long and error-prone. The plug-in even had a speed setting. Too slow and it could take forever, too fast and the procedure would miss deletion of items.

A couple of months ago I looked again into my FB feed, and noticed that I still had my 2017 posts and comments. FB now allows to batch-delete up to 50 posts at once, however the interface can get incredibly slow, and it would only delete 8-10 posts at once. For sure, the batch cleaning feature in FB is the most buggy of the whole site. It's obviously something that they put there to check a box for some demand, without any real effort to make it usable.

I opted not to completely delete my accounts, because a few people still find it useful to reach me via the occasional DM, and because I wanted to use my existing connections to keep people on the loop about the progress of my trading system project, that I obviously want to promote.

I don't miss social interaction one bit. In fact, it's a weight that was lifted from my shoulders. At some point, daily social media activity became a chore. Quick blurbs of text and funny or interesting videos can quickly become repetitive. It's a kind of interaction that is pointless and, of course, incredibly time consuming.

Maybe if I were a hot chick, I'd think differently, but for someone that has always had a self-image centered around his R&D as well as his interest in sharing his own "deep thoughts" ("deep thoughts and simple food" was my mantra already 30 years ago), reducing my publishing activity to "tweets", was a lobotomizing experience.

I'd be lying if I said that I'm above the need of validation. I like for my work to be appreciated as much as the next guy, but it's much more meaningful to have a blog with three readers instead of thousands of "contacts" scrolling past your name every day.

What makes things worse, is that Twitter and Facebook are controlled platforms built to serve interests of shadowy entities (including your own "democratic" government), and that believe in selective free speech (that would be an oxymoron, btw). It's like being a guest at a shitty party… I'd rather be home doing my own party with a couple of friends. It's a no-brainer for me.

Early on, Twitter had the power to get me loosely connected to people with common interests, mostly other game developers. Today however everything reeks of politics, making some Twitter feeds look like endless passive-aggressive rants. Get me out of here.

Facebook is the worst social platform of the two. It's a nostalgia platform. Though it can be cool to keep in touch with virtually anyone across decades, there are reasons why some people normally lose track of each other in life, even if they care for and respect each other. Keeping in touch today is very easy, but it's healthier if it's done privately, with the intent to keep in touch, rather than simply living in the same cyber-neighborhood.