DEV Community

Cover image for Your Next AI Chat Is Earned Outside
Himanshu Nikam
Himanshu Nikam

Posted on

Your Next AI Chat Is Earned Outside

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

I didn't want to build another app that simply tells people to go outside. I wanted to try something different: make the AI itself the reward.

Touch Grass is an Android app where you earn tokens by walking and completing outdoor missions. Those tokens unlock a small AI companion that runs locally on your phone. When your balance reaches zero, you need to get back outside and complete more activities to earn tokens.

Each day, the app gives you different ways to get outside:

  • GO: Visit a nearby green space and check in to earn 500 tokens.
  • LOOK: Find something outdoors, such as a yellow flower or an interesting shadow, and photograph it to earn 300 tokens.
  • LEARN: Explore a nearby landmark or tree, check in, take a photo, and read what the map says about it to earn 700 tokens.

Walking also earns 100 tokens for every 250 metres, up to 5 km per day. The app tracks progress through its history screen, daily streaks, and badges.

The idea is simple: give people a reason to use their phones for something useful, then encourage them to put the phone away and explore the world around them.

Demo

Video walkthrough: The video will show the initial setup, airplane mode, the locked AI chat, outdoor missions, and the AI companion working after earning tokens.

Try it: Download the Android APK.

The app requires an Android ARM64 device. The first setup downloads the AI model, approximately 470 MB, and nearby map data, so Wi-Fi is recommended. This testing build is signed with a debug key.

Code

🌱 Touch Grass

Stop doomscrolling. Touch actual grass. Earn free on-device AI tokens.
A 100% offline, privacy-first mobile exploration game that trades physical footsteps for local AI compute.


📸 Screenshots & Visual Tour

Here is what Touch Grass looks like in action:

1. Setup & Model Download 2. Daily Quests (Today) 3. Offline AI (Companion) 4. Field Journal 5. Stats & Badges (History)
Setup Screen Today Screen Companion Screen Journal Screen History Screen
One-time Wi-Fi model grab & OSM area cache GO / LOOK / LEARN daily quest cards Private Qwen 0.5B LLM — 1 token per token Scrapbook with geotags & proof photos 14-day activity chart & 9 Grass Badges

💡 Why This Exists

The Problem

  • The Laptop Trap: Developers, engineers, and students are glued to screens 12+ hours a day. Zero sunlight, zero movement, pure burnout.
  • The $20/month AI Tax: ChatGPT Plus, Claude Pro, and cloud API tokens are expensive. If you…

The source code is available on GitHub under the MIT License. The README includes the setup and build instructions.

The project also includes checks that can be run with Node.js. For example, node scripts/check_missions.js. The full set of checks is listed in package.json.

How I Built It

The model. I built the app with React Native and Expo using JavaScript. The AI runs locally on the phone through llama.rn, which connects React Native to llama.cpp. The model is Qwen2.5-0.5B-Instruct, quantized as a Q4_K_M GGUF file of approximately 470 MB.

I benchmarked different thread counts on a release build using a 64-token completion:

Threads Tokens/sec
2 21.6
3 30.0
4 37.8
5 22.7
6 26.8

Four threads gave the best result in my test. Six threads were actually slower than three, which surprised me.

The map. During setup, the app retrieves nearby OpenStreetMap data through the Overpass API and caches the results for an area within 1 km. Missions are generated from the cached map data using ordinary code, rather than asking the AI to choose places.

I initially experimented with AI-generated mission descriptions. The model sometimes invented details, such as calling an ordinary park a "tree sanctuary" or making up distances. I turned off that feature and switched to templates based on the available map data.

Where the model is used. The AI powers the Companion chat and helps summarise information for LEARN missions. For LEARN, the model receives the place's OpenStreetMap tags. A basic grounding check rejects certain unsupported numerical or historical claims and falls back to the raw tags when the check fails. It is not a guarantee that every answer is correct, and Companion chat is not checked by this validator.

Checks. The app validates GPS accuracy and distance from a mission target, and rejects mock locations. Walk tracking filters inaccurate GPS fixes, tiny movements, and speeds above approximately 15 km/h to reduce GPS errors and obvious attempts to earn tokens from vehicle travel.

When a photo includes an EXIF capture timestamp, the app checks that it is not older than ten minutes. The app does not identify the objects in photos. It can warn when a photo appears very dark based on its exposure metadata.

I also learned that file size alone is not a reliable way to detect a covered camera lens. A nearly black photo can still be a full-size image, so I added a check based on EXIF information such as ISO and exposure time.

Why Does Open Innovation Matter?

Running an open-weight model directly on the phone made this idea possible without sending every chat message to a cloud AI service. The token system, mission rewards, and chat lock are implemented in the app itself.

A few things mattered to me:

  • No custom backend. The model and map data are downloaded during setup. The initial map request sends the area's coordinates to an Overpass server, but the app does not need my own server to handle chat messages or walking progress.
  • Offline use. After the model and map data are cached, the core missions and AI chat are designed to work in airplane mode.
  • No AI API key or per-request cloud bill. The tokens are game currency earned through outdoor activities. Local inference still uses the phone's battery and computing resources, but it does not require a paid AI API for each response.
  • Control over the model. With the model running locally, I can experiment with compatible model files and inference settings instead of relying entirely on a hosted AI provider.

The trade-off is response quality. A small 0.5B model can give short answers and sometimes get things wrong. For an app intended to encourage time away from the screen, I wanted to explore whether a small local model could still make the experience useful.

Prize Categories

  • Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
  • Best Use of GitHub Copilot:

Top comments (0)