Thursday, January 27, 2022

Open Source Voting Machines: 2022-01

A year ago I posted a teaser of some work I'm doing on Open Source Voting Machines.

The ballots are looking a lot better now. There's a proper header and 'how to vote' instructions. The big feature I've been working for the last month is ballot recognition. Given a scan of any known ballot page, identify which precinct it is and scan the appropriate bubbles. With that I think this is now much closer to being a practical system where a central scanning operation could receive absentee ballots and precinct ballots and scan them all. All this with no barcodes, it's 100% human readable. This can be important psychologically to voters because there are no mysterious markings for people to get suspicious of. Most places I've voted still have a plain serial number on each ballot to prevent duplication, that can be addded if desired.

The test ballot I'm generating is based on random words from the Linux dictionary, so just look at it visually and don't read too much into the nonsense ;-)



Thursday, January 20, 2022

Best Wordle Start Word: raise

 I'd seen a couple other posts and decided to do the analysis myself.

There are two word lists of 5 letter words; one with 2315 words and one with 10657 words. Others have noted that the shorter list is probably words that could ever be a solution to wordle, and the longer list is things that will also be accepted as guesses. Linux /usr/share/dict/words contains only 6112 words that match ^[a-zA-Z]{5}$ .

Doing letter frequency analysis on the union of these lists leads to the impression that the best word (with the most frequent letters) is "soare" (an obsolete word for a young hawk). Doing this just on the solution list yields "later" "alter" or "alert".

But we can do better. wordlehack.go does the following:

for each guess word:

  for each target word:

    for some {target} and {guess}, how many possible words remain?

  get the sum of remaning words for all targets

So, what word has on average the fewest remaining words after it has been guessed, across all possible targets? "raise"

This takes into account letter position, not just letter frequency. "arise" is not quite as good.

And if "raise" gets you nothing, the best next word is "clout".

So, there you go, go forth and be more reputable among your peers. raise your clout.

---

Source code (jupyter notebook python and Go)

https://github.com/brianolson/wordlehack

Go play the game

https://www.powerlanguage.co.uk/wordle/


Tuesday, January 4, 2022

Aerial Survey with Open Drone Map

Open Drone Map promises to be an open source tool chain that takes a set of aerial photos and turns them into a map with 3d reconstruction. Last summer I took a bunch of aerial videos hoping to feed them into a process like this. I hadn't researched the details of the tools I'd use to do it, but I vaguely knew they were out there.

I wish I'd known two rules for working better with ODM:

  • Fly high, look down (no horizon in the shot)
  • Take stills, not video (no motion blur, my drone adds GPS tags to stills). It looks like the system will work better with 20-40 stills than all those frames of video.
But still, I was able to get some mediocre results out of ODM with what I had.

I forked ODM and made a branch with setup and run that doesn't use Docker. (branch "no_docker")

I used ffmpeg to get jpeg frames out of my video. Here grabing a section from 3 minutes 24 seconds to 4 minutes 48 seconds, at 2 frames per second, to a directory of images:
ffmpeg -i 'source.MP4' -ss 3:24 -to 4:48 -filter:v fps=2 /path/to/odm/data/images/%05d.jpg

Then from the ODM source dir, I activated the python venv and ran the ODM wrapper script:

(source odmve/bin/activate && ./run.sh --project-path /path/to/odm data)

I'm hoping when I go back and scan the area with what I know of technique I'll get better output. The system is tantalizing enough that I want to do more.