Ollama, etc.
We were today introduced by M to Ollama and the idea of running LLMs locally, with benefits that might include reduced cost (energy and otherwise) and improved privacy. We were then prompted to consider the (many) biases built into commercial AI systems, their impact on our individual needs, and how local, open models might start to mitigate, counter, or steer around them. The first model I downloaded and tried, Qwen3 3b, slowed my poor Macbook Air to such a crawl that it eventually turned itself off, twice. Things can only get better!
While D:Ream were sadly incorrect about that, unless, unbeknownst to almost everyone, they were actually singing specifically about the Welsh town of Machynlleth, which is far more vibrant now than I remember it being during my mid-90s childhood (main memory – rain), after the session I started to play around. My idea was that, rather than worry about my own movements in physical space, I would make a bot that would navigate the world of Google Streetview on my behalf. After an hour or so of making an API key and discovering various restrictions designed to prevent supposed misuse, I’d got a simple bot that moved around Streetview via some very kludged JS and tiny local Python server. Restrictions tried to prevent me from capturing images from the bot’s POV for CV analysis, but the idea was that I’d prime the bot with some holiday photos and, as many of my favourite spots had become less physically accessible to me, the bot would then roam around the UK coastline, analyse and describe what it saw, and try to find (visually) close matches. If image analysis found a likely match, the bot would then consult local satellite imagery (am I near the sea?) and weather data (what is the weather, particularly visibility like?) in order to reduce the number of false positives, before a final check — as far as possible at least — of access (how far is it from a path and a road?). The bot would also record its own path, any ambient data, and the decisions it had made to a comma-separated text file. At the end of a run, these would would be automatically fed into a locally hosted LLM in order to produce a narrative travelogue that more poetically outlined why I might want to visit a particular location. Within a couple of hours I had got all but the access check running in a basic form. The bot moved slowly and jerkily around Streetview, a hacky image capture system fired on each step, a CV library looked for the presence of sea-like blue colours in large amounts, and, after a basic sanity check, a new line was saved to a text file on the desktop and subsequently loaded into Ollama and narrativised by the smallest qwen2.5 model. While this might sound like a good start, even after some hours of trying to improve the bot’s navigation, the sheer number of dead ends and disconnected segments in Streetview thwarted my efforts – left to run for an hour or so, the bot would move only a few hundred metres (sometimes less) across the map before getting stuck, or, having reached an impasse, head back to its starting point! There also seemed to be no real way to improve on one frame of movement every few seconds (a kind of jerky lurch), I’m fairly sure the image capture broke Google’s Ts + Cs (in spirit at least), and alternative platforms (Mapillary, Apple Maps Look Around, Bing Streetside) lacked coverage of the UK locations I wanted. I’m not impatient in most circumstances, but I scrapped the idea at this point.
To give you an idea of the process, some scraps of code are below, and a video screen capture (very dull – like bad slow television) of when I first got the bot moving on its own (it uses simple Brownian motion to decide where to go):
To tell Google Chrome to get the URL of the active tab of front window, when this is Google Streetview, for example: https://www.google.com/maps/place/Royal+Mail+Group+Ltd/@52.509413,-1.7936541,3a,75y,90.18h,90t/data=!3m7!1e1!3m5!1s5XGU2g4nJK6-FDu3Y_ZTDA!2e0!6shttps:%2F%2Fstreetviewpixels-pa.googleapis.com%2Fv1%2Fthumbnail%3Fcb_client%3Dmaps_sv.tactile%26w%3D900%26h%3D600%26pitch%3D0%26panoid%3D5XGU2g4nJK6-FDu3Y_ZTDA%26yaw%3D90.17676805262938!7i16384!8i8192!4m9!1m2!2m1!1s22+neville+road!3m5!1s0x4870baafd97a8e47:0x107a7567d59b1052!8m2!3d52.5097862!4d-1.7937131!16s%2Fg%2F11bzsx3ms3?entry=ttu&g_ep=EgoyMDI1MDcyMy4wIKXMDSoASAFQAw%3D%3D
Paste in Terminal:
osascript -e ‘tell application “Google Chrome” to get URL of active tab of front window’ \
| sed -En ‘s/.*@([0-9.-]+),([0-9.-]+),.*/Latitude: \1\nLongitude: \2/p’
///////////////////
To fire off this every 60 seconds in Terminal on macOS (Ctrl +C will stop it), paste in Terminal:
while true; do
osascript -e ‘tell application “Google Chrome” to get URL of active tab of front window’ \
| sed -En ‘s/.*@([0-9.-]+),([0-9.-]+),.*/Latitude: \1\nLongitude: \2/p’
sleep 60
done
//////////////////