Sunday, December 7, 2025

BrainBit Flappy Bird! No Coding Edition

Flappy Bird, Focus!

Gemini 3 Pro + Antigravity

Google released a multi-model that excels at agentic coding, and a new IDE to go with it! Naturally, I need to test things out and I had just the project

Antigravity

Google's new IDE is very similar to VS Code + CoPilot + Playwright MCP, but perhaps a bit better integrated since it all comes from Google. From my testing, the standout feature seems to be the tightly integrated multi-modal Chrome usage, whereby Gemini uses Chrome in a fairly native screen based manner (for better and worse, Playwright uses selectors mostly).

Custom BrainBit Training

BrainBit makes a pretty fun EEG Headband, with the standout feature being an SDK allowing free, private brain exploration! I've made a few different games, trainers, recorders, etc. over the years, but given Antigravity + Gemini 3's browser capabilities, it seemed like a good time to try making a fresh web based game.

Flappy Bird

I went for a classic but kept very low stress! It took the usual prompting for review, fixing issues, etc. but Gemini was able to deliver an excellent game. Did I mention I didn't type a single character of code!

Details on my GitHub: GregariousEngineering/brainbit-flappy-bird  


 

Sunday, August 3, 2025

Llama Data Science πŸ¦™πŸ¦™πŸ¦™

πŸ¦™πŸ¦™πŸ¦™ Llama Data ScienceπŸ¦™πŸ¦™πŸ¦™  

Full code and usage at GregariousEngineering/llama-datascience 

In short, ChatGPT’s brand new OPEN-WEIGHTS model gpt-oss does data science better and faster than many people :)

Runner up, Mistral Small 3.2 was also quite competent!


gregarious@hal9000:~/code/llama-datascience$ ./llama_datascience.py --data-file traffic_volume_000256_2004_2024.csv "What is the best time to travel South through the intersection?"
Expert: gpt-oss (temp: 0.5)

--- Expert Reasoning Step 1/20 ---
> Expert wants to use tool: 'python_datascience'
> Reason for tool selection: Load and inspect data
> Code:
import pandas as pd
import numpy as np

# Load data
try:
    df = pd.read_csv('/sandbox/data.csv')
except Exception as e:
    print('Error loading CSV:', e)
    df = None

print('Columns:', df.columns.tolist() if df is not None else None)
print('Head:')
print(df.head() if df is not None else None)

> Code execution complete.
output:
Columns: ['Count Date', 'Dir', '0h', '1h', '2h', '3h', '4h', '5h', '6h', '7h', '8h', '9h', '10h', '11h', '12h', '13h', '14h', '15h', '16h', '17h', '18h', '19h', '20h', '21h', '22h', '23h']
Head:
   Count Date Dir  0h  1h  2h  3h   4h  ...   17h   18h  19h  20h  21h  22h  23h
0  12/01/2024   P  91  45  32  23   21  ...   837   575  445  358  198  149   63
1  12/01/2024   S  49  30  19  28   42  ...   783   535  359  199  164   89   48
2  12/02/2024   P  54  27  20  26   49  ...  1758   794  486  326  237  191  111
3  12/02/2024   S  18  17  15  36  154  ...   924   506  265  214  163  104   54
4  12/03/2024   P  54  27  17  33   52  ...  1745  1017  584  456  331  145  105

[5 rows x 26 columns]


--- Expert Reasoning Step 2/20 ---
> Expert wants to use tool: 'python_datascience'
> Reason for tool selection: Compute average hourly counts for South direction and find best hour
> Code:
import pandas as pd
import numpy as np

# Load data
try:
    df = pd.read_csv('/sandbox/data.csv')
except Exception as e:
    print('Error loading CSV:', e)
    df = None

# Ensure numeric columns
hour_cols = [col for col in df.columns if col.endswith('h')]
# Convert to numeric
for col in hour_cols:
    df[col] = pd.to_numeric(df[col], errors='coerce')

# Filter South direction
south_df = df[df['Dir'] == 'S']

# Compute average per hour across all South rows
avg_counts = south_df[hour_cols].mean()

# Find hour with minimum average
best_hour = avg_counts.idxmin()
print('Average counts per hour for South direction:')
print(avg_counts)
print('\nBest hour (lowest average traffic):', best_hour)

# Also show min count across all South rows for that hour
min_count = south_df[best_hour].min()
print('Minimum count on best hour across all days:', min_count)

> Code execution complete.
output:
Average counts per hour for South direction:
0h       40.570433
1h       25.991288
2h       22.957110
3h       34.281598
4h       97.354108
5h      349.480231
6h      762.930438
7h     1107.911272
8h      900.093553
9h      686.656346
10h     630.000670
11h     644.783273
12h     646.281866
13h     645.476880
14h     654.760488
15h     681.876960
16h     741.068489
17h     734.114194
18h     533.185096
19h     328.717732
20h     260.428897
21h     208.710763
22h     134.479426
23h      70.539204
dtype: float64

Best hour (lowest average traffic): 2h
Minimum count on best hour across all days: 4


--- Expert Reasoning Step 3/20 ---
**Best time to travel South**

The hour with the lowest average vehicle count for the South‑bound direction is **2 h** (the 2 :00 – 3 :00 AM slot).  
Across all days in the data set, the average count for that hour is about **23 vehicles**, and the smallest single‑day count recorded in that hour is **4 vehicles**.

So, if you want the least traffic when heading South through the intersection, aim for the 2 :00 – 3 :00 AM window.

Wednesday, July 16, 2025

Hello, Gemma! - Part 1: The Build

Hello, Gemma3n!

Jetson + MatFormer + PLE Caching + Audio Input

Bringing Google latest open-source model, Gemma3n, to NVIDIA Jetson Orin to enable on-device, live audio chat!


Google Gemma 3n is nothing short of incredible! In addition to incredible multi-modal performance in a tiny, efficient package, they also managed to add multi-language audio input!!

 

Design Considerations: 

  • Python + transformers + torch
    • Audio input is so new, we'll have to leverage the latest tranformers package from HuggingFace to leverage it.
  • jetson-containers
    • To make things easy, I'll build a container with the latest transformers for the Jetson using jetson-containers
  • Piper for efficient on device text-to-speech 

 …video coming when I get a chance shrink it…

Full build and details on GitHub: GregariousEngineering/hello-gemma 

Up Next!

  • Wake word and query completion detection
  • Internet access
  • Remote LLMs 


Friday, July 11, 2025

πŸ¦™πŸ¦™πŸ¦™ Llama Panel πŸ¦™πŸ¦™πŸ¦™

A multi-model agentic app to provide internet backed, consensus based answers from a configurable panel of LLMs (ReAct , Self- and Cross-Consistency)

Open Source Greatness in Numbers

Open Source LLMs have come a long way and can now challenge closed source models! Excitingly several Instruction Tuned open source models are now out and proving quite capable. Moreover, thanks to great improvements in efficiency and quantization, capable models are now small enough to run many on one system.

Building on the idea that groups outperform individuals on various cognitive tasks, I set out to create at simple application to see if these latest models perform better as a group!

Python Leading Llama Leading Llamas πŸπŸ¦™πŸ”ŽπŸ¦™πŸ¦™πŸ¦™

For simplicity, I built the app in Python on top of Ollama. A large capable model, ideally instruction tuned, leads the investigation, querying the panel of models and internet until a reasonable consensus is reached!

Sample Run!


gregarious@hal9000:~/llama_panel$ ./llama_panel.py "Are we past the AI event horizon today?"
Initializing expert panel...
Expert: mistral-small3.2 (temp: 0.0)
Panel: gemma3:4b (temp: 0.50), granite3.3:2b (temp: 0.50), qwen3:4b (temp: 0.50)

--- Expert Reasoning Step 1/20 ---
> Expert wants to use tool: 'llama_panel'
> Reason for tool selection: I need to understand the panel's perspective on the current state of AI development.

> Consulting the panel with the question: 'Are we past the AI event horizon today?'
  - Querying panelist 'gemma3:4b' (temp: 0.50)...
  - Querying panelist 'granite3.3:2b' (temp: 0.50)...
  - Querying panelist 'qwen3:4b' (temp: 0.50)...
> Panel consultation complete.

--- Expert Reasoning Step 2/20 ---
> Expert wants to use tool: 'search_web'
> Reason for tool selection: I need to find current information on whether we have passed the AI event horizon in 2025.

> Performing Google search for: 'Are we past the AI event horizon today 2025'
> Found 10 URLs.

--- Expert Reasoning Step 3/20 ---
> Expert wants to use tool: 'get_webpage'
> Reason for tool selection: This is Sam Altman's personal blog post where he discusses the AI event horizon and the gentle singularity.

> Fetching content from URL: https://blog.samaltman.com/the-gentle-singularity
> Successfully fetched and parsed content from https://blog.samaltman.com/the-gentle-singularity

--- Expert Reasoning Step 4/20 ---
> Expert wants to use tool: 'get_webpage'
> Reason for tool selection: This article provides a different perspective on whether we have crossed the AI event horizon.

> Fetching content from URL: https://www.cityam.com/have-we-crossed-the-ai-event-horizon/
> Successfully fetched and parsed content from https://www.cityam.com/have-we-crossed-the-ai-event-horizon/

--- Expert Reasoning Step 5/20 ---
> Expert wants to use tool: 'llama_panel'
> Reason for tool selection: I need to gather diverse opinions from the panel to form a consensus.

> Consulting the panel with the question: 'Based on the information provided, do you agree that we have passed the AI event horizon? Please provide reasoning.'
  - Querying panelist 'gemma3:4b' (temp: 0.50)...
  - Querying panelist 'granite3.3:2b' (temp: 0.50)...
  - Querying panelist 'qwen3:4b' (temp: 0.50)...
> Panel consultation complete.

--- Expert Reasoning Step 6/20 ---
> Expert wants to use tool: 'llama_panel'
> Reason for tool selection: I need to gather diverse opinions from the panel to form a consensus.

> Consulting the panel with the question: 'Based on the information provided, do you agree with the conclusion that while we may not have crossed the 'event horizon' in a technical sense, the rapid integration of AI into society suggests that we are on the cusp of a transformative era—one that will require both innovation and responsibility?'
  - Querying panelist 'gemma3:4b' (temp: 0.50)...
  - Querying panelist 'granite3.3:2b' (temp: 0.50)...
  - Querying panelist 'qwen3:4b' (temp: 0.50)...
> Panel consultation complete.

--- Expert Reasoning Step 7/20 ---
> Expert wants to use tool: 'final_answer'
Based on the diverse opinions gathered from the panel, we can conclude the following: 
While we may not have crossed the 'event horizon' in a technical sense—achieving
human-level AI (AGI)—AI's integration into society is rapidly transforming our world, 
blurring the lines between human and machine intelligence. The 'event horizon' 
metaphorically represents the point where AI becomes so pervasive that its impact is 
irreversible and ingrained in daily life, shaping our expectations and norms. The debate 
reflects a tension between the potential of near-term advancements and the challenges of 
achieving AGI. Balancing optimism with caution is essential as we navigate this 
transformative era of AI integration, focusing on ethical development, safety measures, 
and fostering collaboration between humans and AI to maximize benefits while mitigating 
risks.

Application, including usage and details on GitHub: GregariousEngineering/llama_panel


Up next:

Group-to-Individual thinking!

Thursday, March 14, 2024

Hackles Feedback Hypothesis

Hackles Feedback Hypothesis




“The facial feedback hypothesis, rooted in the conjectures of Charles Darwin and William James, is that one's facial expression directly affects their emotional experience. Specifically, physiological activation of the facial regions associated with certain emotions holds a direct effect on the elicitation of such emotional states, and the lack of or inhibition of facial activation will result in the suppression (or absence altogether) of corresponding emotional states.”https://en.m.wikipedia.org/wiki/Facial_feedback_hypothesis

I ask, does smoothing or raising a dog’s hackles affect their emotional experience??

Sunday, December 25, 2022

The Smartest “Dumb” Sprinkler on the Block!

The Smartest “Dumb” Sprinkler on the Block!



Options Galore

There’s no shortage of smart sprinklers available—internet connected, Bluetooth enabled, learning, weather forecasting marvels! They save water and for many they are probably just right. 

But most are expensive, can be challenging to configure, may require an ongoing subscription, and might even collect your data!


The Free (and Fun!) Option

Moreover, I already have a sprinkler controller that works! It's just a difficult to use timer, but with plenty of tinkering it gets the job done.

And importantly for this endeavor, it has a spot for you to wire in a Rain Sensor! They overpriced switches allow disabling scheduled waterings when recent rainfall is detected. I believe they are sold largely to meet regulations, are seemingly rarely functioning (case in point, my HOA sprinklers run in the rain despite having a sensor "installed"), and are at best reactive. Plus, my controller was in my basement so Rain Sensor installation would require drilling a hole in my house...

Instead of a Rain Sensor, I devised to plug in an internet enabled, programmable switch that could see the future! By wiring in a relay controlled by a Raspberry Pi, I could programmatically disable the sprinklers on my command!

 

The Build

Fortunately I have a pile of Raspberry Pi's and Qwiic accessories laying around. I chose a Pi over an Arduino or similar for the full: OS, VNC, SSH, SystemD, etc., which would allow me to manage things without having to venture to the basement to reprogram anything. It would also leave me plenty of headroom for future projects, e.g. disabling sprinklers through HomeKit!

I chose DarkSky Weather API because it was reliable and free, but it has since been purchased by Apple who has announced they will soon only support weather with a current Developer Account ($). I'm looking around for alternatives.

A Raspberry Pi Zero W 2, Python and and some Qwiic modules from Sparkfun made the whole thing painless. 

Lots of details and code can be found on GitHub: Sprinkler Pi Sense


Friday, April 8, 2022

"Real" Spinach & Arugula - Aero Garden

"Real" Spinach & Arugula

Part 2 - The Grow



New Problems

  1. Root Sensitivity

    • I knew spinach, arugula and the like don't transplant well and are recommended started in the ground, but regardless of technique, all plants experienced some stress and shock on moving to the aero 

      • I ended up using two site for starting seeds right in the aero and two sites for mature plants. The plants grow so vigorously there wasn't room for four full grown plants anyhow

  2. Poor Choices?

    • Rocky (Diplotaxis tenuifolia)

      •  Has turned out to be sloooooooooooooooooooow growing. In picture below, the tiny plant closest is Rocky, which was started at the same time as the spinach (back) and Astros (left and right)

    • Spinach and arugula preferences

      • Arugula wants lots more ammonium than spinach, and making one happy caused the other issues

    • Bad sensors

      • I had a SparkFun Environmental Combo Breakout - CCS811/BME280 sensor that came with the Qwiic kit, but as other note, the CO2 sensor heater throws off the humidity and temperature

  • Bad sensor preparation

    • I fried my initial Qwiic SCD41 CO₂ Humidity and Temperature Sensor when it got wet! This was easily fixed with a liberal application of silicone conformal coating on it's replacement

 Successes 

  1. Astro is incredibly fast and large yielding, and seems to never bolt!

    • I've started growing four Astro. It lacking in variety, but each plant yields a small salad each week, sprout in days, and mature in about two weeks

  2. Lots of delicious Rocky flowers!

    • While very slow growing, it was quick to bolt and produced spicy delicious flowers for a two weeks

  3. ESP32 Thing Plus, Qwiic accessories, and Cayenne made monitoring a breeze

    • More below!




Aeroponic Sensor Upgrade 

The Arduino Wifi Rev2 was good enough for temperature monitoring but lacked Qwiic and was large..

Enter the ESP32 Thing Plus! Small, efficient WiFi and Qwiic enabled module from SparkFun!

Full details and example code on my GitHub 

 

Up Next: The Garden

It's spring! Time to take my grow experiments to the backyard!!


BrainBit Flappy Bird! No Coding Edition

Gemini 3 Pro + Antigravity Google released a multi-model that excels at agentic coding, and a new IDE to go with it! Naturally, I need to te...