Sunday, February 2, 2025

Bot vs. Bot

We live in a revolutionary time! One huge component of the revolution is computer technology, on which the internet is built, on which social media are built, on which political manipulation of people's perceptions is enabled. Political power is all about the ability to steer the behavior of people. Enforcing obedience with threats is a very inefficient way to steer behavior. To surround people with a story that motivates people to behave as one wishes, that is far more effective. And now the technology is in place to provide that capability.

Control over the story is always the fundamental political battle. What changes is the technology. How do people learn the stories through which they make sense of their world? It's not that the struggle over the story is anything new. Sometimes, though, the story can be trapped. Some group manages to take control of the story, to use control of the story to maintain that control. Whatever struggle is possible, that has to go underground. Centuries can go by, where any sort of deviation from the approved doctrine is subject to the most severe penalties. It's a form of societal suspended animation. It's quite risky, too, because such a rigid structure cannot respond effectively to external threats.

Is our present revolution one where rigidity is melting away, or where rigidity is setting in? Probably we have not quite reached that fork in the road. We seem to be more in a metastable situation, where we might fall one way or another, but we have not yet fallen. How might we work to maintain social vitality, to keep multiple stories in play, to cultivate sensitivity and responsiveness?

One approach is through some kind of central regulation. The various social media platforms already embody centralized power. Platforms can be required to, perhaps, balance coverage of opposing views, for example.

I suspect that central regulation can't work. Power corrupts! We need a distributed approach!

Fight bots with bots! That's my idea! Yeah, we are being inundated with a tsunami of misinformation. We need a counter-tsunami!

I don't know enough about the patterns of social media, viral memes etc., to be able to elaborate this idea in any real detail. But the basic elements are simple enough. The basic pattern we seem to be falling into is roughly: 1) hate mesmerizes people; 2) hate divides people; 3) divided, mesmerized people are disempowered; 4) disempowered people can easily be exploited. To counter this pattern, we need bots that dissolve the bond of mesmerization, bots that bring people together, bots that empower people.

Bots are simply social media agents. They can post messages, reply to messages, and react to messages. Bots can also work in teams, and also cooperated with human teams. Bots are inevitably a bit stupid, but their great virtue is their low cost. The scale of the problem is huge. How many bots are active now on social media, spawning all sorts of hate-filled misinformation... they're cheap! The folks playing these games have deep pockets! The only way to fight this battle effectively is to counter with a force of similar magnitude.

One fundamental component of the battle is to understand the terrain. One function of a bot army is scouting. Stories are introduced and spread on very many different internet platforms. How exactly users discover these platforms... there must be many ways. I am an old guy and so I am very out of touch with what's really happening. I know a lot of on-line games also function as social media platforms. Surely bots play on-line games too, and as artificial intelligence technology advances, they will get harder and harder to distinguish from human players. And anyway the bots don't have to be too good at fooling people. If they are just acting as spies, they can pick up a bit of information here and a bit there. The objective is to discover trends early.

Once any sort of hate-inducing misinformation meme is discovered to be spreading, a variety of counteractions can be triggered. Alternate stories can be introduced, the more accurate the better. Existing stories that counter the misinformation can be given positive reactions, or reshared. The social media platforms will amplify whatever is getting a lot of activity, so simply creating a lot of activity related to alternate stories will tend to quash the misinformation.

New media are almost always destabilizing. We just need to learn to manage what we have unleashed!

Monday, January 13, 2025

Paving a Road

Here is a new piece in 99edo. Since I added an interval similarity score to my software, I am exercising its other various capabilities to see how they work with the new score. Today I have incorporated a scale into the system.

The non-standard Tonnetz diagram above shows the scale I have devised. This diagram shows intervals of 5:4 vertically and 7:4 horizontally. Intervals of 3:2, perfect fifths, are not shown in the diagram.

This scale includes 37 of the 99 pitch classes. Maybe it should be called a subset rather than a scale! How conventional terminology should properly be applied in this kind of unconventional context, I sure don't know enough to have a useful opinion! I'll call it a scale, because it has many properties of a conventional scale like a diatonic scale: it is built from a chain of repeated intervals, it circulates, and it supports comma traversals.

The generating interval for this scale is 16 steps of 99edo, which does not correspond to any very fundamental just-tuned interval; 28:25 looks like the simplest. The circulating quality can be observed in the diagram. A key change in one direction would remove the 0 pitch class and add the 97 pitch class; the other direction removes the 81 pitch class and adds the 83.

This scale supports traversal of a family of commas, formed by combinations of two primitive commas. A comma traversal appears on the diagram as a path from a cell labeled 0 to another cell labeled 0. Since the diagram does not include perfect fifths, a little imagination is required! I have highlighted a cell labeled 58. This is a perfect fifth above the 0 pitch class. One can imagine a third dimension for this diagram, with the next layer above the one shown having a 0 cell right above the 58 cell. So a path from a 0 cell to another 0 cell can be formed from a path from a 0 cell to a 58 cell, just adding one more step of a perfect fifth to climb up to the 0 cell in the next layer.

The short path from a 0 cell to another 0 cell in this diagram corresponds to traversing the comma 3136:3125. There is a path from a 0 cell to a 58 cell directly above it; this corresponds to traversing the comma 393216:390625. These primitive commas can be combined to make paths from the other 0 cells to the 58 cell, corresponding to the commas 2401:2400 and 6144:6125.

This piece has 81 measures, each about 40 seconds long, arranged in a 9x9 matrix. I initialized the system so each measure traversed the comma 6144:6125. I started the thermodynamic simulation with the temperature set moderately high and then gradually lowered it until a phase transition was detected. My intention was that with the constraint of the scale, the initialization, and the moderate starting temperature, the structure of 81 comma traversals would be maintained. But I don't really hear the traversal, nor do I see it when I analyze the score!

So, here is yet another piece in 99edo! From the prior run, I know the temperature of the phase transition. So I initialized the system in the same way, but just set the temperature at the phase transition and let it run a while. With luck, there was enough jostling to create interesting variations, but not too much so the traversal structure could be maintained.

I made a folded score for this second version, where the 81 measures have all been superimposed. This should make clear the general pattern. And indeed, the traversal structure is very clear here. With any luck, it will be apparent to the ear, too!

Sunday, January 12, 2025

On the Steeper Trails

Here is a new piece in 99edo. I am continuing to explore the capabilities of the new interval similarity cost function that I've added to my algorithmic composition software. My first test was in the Bohlen-Pierce tuning, which is so unconventional that really I couldn't judge how well the code was working! It was just what the code was set up to do, so it was mostly just to check that anything reasonable could be generated. The next two tests were in 34edo, using quite conventional notions of consonance. These helped me tweak various parameters to coax the system into generating music that sounds somewhat reasonable. This 99edo piece extends the notion of consonance to include intervals like 7:6. I tried to tweak parameters even further to make the output intelligible.

I chose 99edo as a compromise between tuning precision and temperament potential. I like to provide harmonic interest by way of comma traversals. 99edo tempers out a few relatively simple commas, such as 2400:2401, 3136:3125, 5120:5103, and 6144:6125. These commas provide several opportunities for traversals to arise. The way I am generating these first trial pieces with the interval similarity score, I just start the system at a very high temperature and slowly cool it until a phase transition is detected: the heat capacity spikes at the transition. I hold the system a bit longer at the spike, and then write out the result. Whatever order or shape is in the system will have arisen spontaneously; this is what a phase transition is about.

The graph above is a score for this piece. The vertical axis shows the pitch classes, from 0 to 98. The horizontal axis is the time in seconds. This piece has 512 measures that are 6.9 seconds long. They are arranged in an 8x8x8 matrix. Sides of length 8 should be large enough that comma traversals have a chance to survive. Yet 8 is small enough... after about a minute, the loop comes back around, so a listener might be able to connect one pass through the matrix with the next pass.

The score makes it clear that a fair degree of order has emerged in the cooling process. Some pitch classes are very frequent while other pitch classes are almost absent. There is also a strong hint of some periodic behavior: there is a pitch class, perhaps it's number 30, that looks like it fluctuates 8 times through the piece. This is indicative of a comma traversal.

I use a variety of measures to check whether the software is on track to generating a coherent output that has a decent chance of sounding like music. One of these is a histogram of vertical intervals. This piece has three voices, so much of the time there are three notes sounding simulataneously, but I only capture pairwise relationships; indeed, the cost function only tallies pairwise relationships.

The table above lists the 20 most common pairwise vertical relationships. The most common vertical relationship, that occurs 870 times in the piece, is 99 steps of 99edo, i.e. an octave, a frequency ratio of 2:1. This list is a bit odd - most simple ratios are in the list, but how 49:20 ends up used so often... it might be a consequence of whatever comma was getting traversed.

Yeah, a piece like this can sound so strange that it might sound like pure noise. But it actually has a lot of order... to what extent that order makes musical sense, well, that's the point of the exploration!

Saturday, January 11, 2025

More Shorter Segments

Here is a new piece in 34edo. Yesterday's piece placed 144 measures in a 12x12 array. Today's places 256 measures in a 4x4x4x4 array. My hope is that the tighter connections makes the theme and variations structure more apparent.

Friday, January 10, 2025

Proper Testing

Here is a new piece in 34edo. This uses my new interval similarity score. The first trial of this score used the Bohlen-Pierce scale, which is rather esoteric. 34edo, by contrast... well, it is still not so very conventional, but much more so than Bohlen-Pierce!

The various consonance relationships among pairs and quadruples of notes in the score, these are the foundation of the algorithm I use. At the top level, there is a temperature parameter that controls the bias in choosing low cost vs. high cost pitches at whatever particular location. The temperature parameter is varied over the course of a run of the software. By tracking the total cost of the system as the temperature is varied, a phase transition should emerge, a temperature where the total cost changes abruptly. At the transition, fractal fluctuations should occur, which should create musically interesting patterns.

That's the idea, anyway. It doesn't always work. The fractal fluctuations occur around a second order phase transition; sometimes the transition that occurs looks more like a first order transition, where disorder changes abruptly to order, without pausing in between to make nice patterns. With this new interval similarity score, hmmm. It's more like the system gets stuck. Another consonance score in the system captures vertical harmony. Often I restrict notes played at the same time to be in just a few harmonic relationships. That seems too rigid here. I had to make vertical relationships more flexible to allow a transition to occur.

Lots to explore!

Thursday, January 9, 2025

Comparing Intervals

Here is a new piece in the equal-tempered Bohlen-Pierce scale.

This is my first use of a new interval comparison method. My algorithmic composition software is built on a cost function. Pitches are chosen at random, using a probability distribution function determined by the cost function. The pitch to be played, by a particular voice at a particular time, is related to other pitches, those played by other voices at the same time, and by the same voice at different times. The probability for choosing a pitch is higher if the pitch fits well with these other related pitches. The cost function defines what fitting well means.

The diagram above shows two short snippets to be played by the same voice. The snippet a1, a2, a3, a4 is a sequence of notes played at one time, and b1, b2, b3, b4 is a sequence played at a different time, but that is to be some sort of variation closely related to the first snippet.

Suppose the pitch to be played at position a2 is to be chosen. The cost function includes terms to prefer that the pitch at a2 is consonant with those at a1 and a3, the notes immediately before and after a2. Another term encodes a preference for a2 to be consonant with b2.

For the snippets a and b to sound similar, the interval from a1 to a2 should be similar to the interval from b1 to b2. The way I have encoded this is to look at the difference between the two intervals, to treat this difference as yet another interval, and to evaluate the consonance of this difference interval. If one has heard the snippet a and is now hearing the snippet b, one might anticipate b2, expecting the interval from b1 to b2 to be the same interval as from a1 to a2. The actual pitch at b2 versus the anticipated pitch at b2: these two pitches should be closely related. That's my logic behind looking at the difference between the intervals.

Wednesday, January 8, 2025

Solving a GridLexic Puzzle

In a recent post I outlined the rules for GridLexic, a puzzle that some friends and I developed. In this post I will show the steps in solving a particular puzzle instance. Each instance will require somewhat different logical steps, but the instance I show here will cover the most common types.

Here is the initial puzzle. As a reminder, the goal is to put letters into all the empty cells. R, A, and P are already included, so one must pick two more letters out of the nine given possibilities. The yellow highlighted cells are the locations of two four-letter words. All of the cells need to obey sudoku rules, i.e. five distinct letters in each row, column, and sector.

The rows and columns have natural names, counting from the top and the left, the first, the second, etc. The sectors don't have such natural ordering, so in this diagram I give the sectors numbers. This numbering is arbitrary, just so I can write about the solution steps.

Of course one can use whatever steps one likes to solve the puzzle - if the solution obeys the rules, then it is valid! And different instances will call for different approaches. But generally what seems to work well is to start off with as many sudoku-based steps as possible.

These puzzles have irregularly shaped sectors, so some steps are not too much like actual sudoku, but the reasoning is the same. The bottom row must have an R. But sector 4 already has an R, and almost all of the bottom row is in sector 4. The one cell in the 5th column is the only place in the bottom row where an R can be placed, so that's where it goes.

Column 5 needs a P, but two of the cells in that column are already filled in, and two are in sector 2, so there is only one place where a P can be placed in column 5, so that's where it goes.

Now sector 2 and column 4 need an A, which at first glance could be placed in row 1 or row 3. But look at sector 3. It also needs an A, but the only places an A can be placed are in row 3. So sector 2 cannot have an A in row 3! Therefore the A in sector 2 must be in row 1.

Sector 2 needs an R, but column 5 already has an R, so the R must go in the remaining cell in column 4.

Row 4 needs a P, but most of the empty cells are in sector 5, which already has a P. So the P must go in the one cell that is in sector 3.

Sector 3 needs an R, but most of sector 3 is in row 3, which already has an R. So the R must go in row 2.

Sector 1 needs an R, but columns 1 and 2 and row 2 already have Rs. So row 1, column 3 is the only possible place, and that's where it must go.

Sector 1 also needs a P. Row 2 and column 2 both already have Ps, so the only possible place left is row 1, column 1.

Column 3 needs a P, but there are already Ps in rows 2, 3, and 4. So the P must go in row 5.

At this point the sudoku has been pushed as far as possible. The sudoku rules, of course, don't give us any clue about how to pick the fourth and fifth letters of the puzzle. We have placed the given letters, A, R, and P in almost all the places they can go. There are two more As to be placed, in rows 2 and 3, and columns 1 and 3, but sudoku logic is not sufficient to determine how to place these.

Once we have exhausted the sudoku logic - which sometimes happens very early or sometimes, as with this puzzle, rather late - we need to think about what words might fit. Here we have more clues in the horizontal word: the last two letters are "RP". With the other available letters, the only word that comes to mind for me is "CARP".

Once we have decided one of the words, that should open up some further possible sudoku steps, which may provide more constraints on the other word.

Given "CA*P", and the R in row 1 blocking another R in row 4, the only word I can see that might fit is "CAMP". This determines the fifth letter, and the rest of the puzzle can be filled in very easily to complete the solution.

With some puzzle instances, the preliminary sudoku steps don't make either of the words so obvious. One may have to consider several different word possibilities, and look at the sudoku consequences of each possibility. The instances have been designed so that only one pair of words allows a complete sudoku solution, but just how the alternate possibilities will run into contradictions... sometimes it can be a bit subtle!