SUKOSHI: The Little AI That Dreams in Your Browser

By mematron

What is SUKOSHI?

SUKOSHI (少し - "a little" in Japanese) is an experimental autonomous AI agent that lives, learns, and even "dreams" directly within your web browser. It's a passion project exploring artificial intelligence, self-directed learning, and emergent behavior using only client-side technologies. Once initiated, it can continue its processes with or without further direct user input.

Witness a tiny digital mind embark on its journey of understanding. When you provide a topic, SUKOSHI:

  • Researches & Learns: Queries sources like Wikipedia, Wikidata, and DuckDuckGo to gather information.
  • Builds a Personal Knowledge Base: Constructs its understanding by storing facts, concepts, and relationships locally in your browser using IndexedDB. This data resides solely within your individual browser, making the knowledge base distinctly yours and unique to each browser or profile. This decentralized approach ensures a personalized experience with no central server holding your agent's learned information.
  • Visualizes Connections: Explore SUKOSHI's evolving knowledge through a dynamic Concept Graph (powered by D3.js), revealing how different ideas link together.
  • "Dreams" New Ideas: When idle, SUKOSHI enters a "dream state," using a Genetic Algorithm to creatively combine existing knowledge, potentially sparking new insights, questions, or hypotheses for future exploration.
  • Makes Informed Decisions: A Q-Learning algorithm guides SUKOSHI's choices on what to research or process next, influenced by its current knowledge, task queue, and even its "emotions."
  • Exhibits "Emotions": Its "mood" (e.g., Pleased, Curious, Frustrated) influences its learning priorities and the nature of its dream process.

Key Features & Capabilities:

  • Autonomous Agent Logic: Operates with a degree of self-direction and curiosity. Once provided with an initial task or topic, SUKOSHI can continue to learn, evolve its knowledge, and "dream" independently, making further direct interaction optional.
  • Q-Learning Decision Making: Intelligently observes its internal state to choose optimal actions.
  • Dynamic Information Retrieval: Fetches and processes data from external APIs.
  • Persistent Local Knowledge Base: Securely stores and interrelates information using IndexedDB, unique to your browser.
    • Easy Reset: A dedicated "Clear KB" button allows you to instantly erase the entire local knowledge base, offering a clean slate or for troubleshooting.
  • Genetic Algorithm "Dreaming": A unique mechanism for creative synthesis and generating novel lines of inquiry.
  • Interactive Concept Graph: Visually track its expanding network of knowledge.
  • SUKOSHI Helper: Interact with SUKOSHI via a chat-like interface to inquire about its status, ask questions, or suggest tasks.
  • Emotional States: Adds a dynamic layer influencing its behavior and learning, reflecting its internal condition.
  • Entirely Browser-Based: No server-side processing required! Everything happens locally on your machine, ensuring privacy and offline functionality.

Interacting with SUKOSHI: A Quick Guide

  1. Start the Agent: Click the "Start Agent" button.
  2. Seed Its Curiosity (Optional after first start, but recommended for new topics):
    • Use the input field to "Add Task" – give SUKOSHI a topic to research (e.g., "Artificial Intelligence," "Photosynthesis," "The History of Video Games").
    • Alternatively, interact with the "SUKOSHI Helper" (chat icon, bottom right) to suggest topics, learn about SUKOSHI's current state, or ask it to perform lookups.
  3. Observe Its Journey & Autonomy:
    • Activity Log: A real-time feed of its actions, thoughts, and discoveries.
    • Knowledge Acquired: A list of facts and concepts it has learned.
    • Concept Graph: Watch the web of knowledge expand dynamically.
    • Status & Emotion: Keep an eye on its current operational state and "mood."
    • Independent Operation: After being started and optionally seeded with tasks, SUKOSHI is designed to operate independently. It will continue to research (if tasks remain or new ones are self-generated), learn, and "dream" based on its existing knowledge and internal directives. You can simply observe its evolution, or choose to interact further at any time.
  4. Witness "Dreaming":
    • If the task queue is empty and SUKOSHI possesses some knowledge, it may enter a "dream state" after a period of idleness.
    • Look for the Dream Indicator (a glowing circle) at the top of the screen and in status updates. This "dreaming" is not idle; it's a vital process for synthesizing information and forming new connections, especially noticeable when offline.
  5. Patience is Key: SUKOSHI is an experiment. Its learning is procedural and can take time. It might become "intensely focused" or make connections that seem unexpected – that's all part of the discovery!

Technical Snapshot:

SUKOSHI is built with modern web technologies:

  • Vanilla JavaScript (ES6+): Powers the core application logic and interactivity.
  • HTML5 & CSS3: Structures the content and styles the user interface.
  • D3.js: Creates the dynamic and interactive Concept Graph visualization.
  • IndexedDB: Enables efficient, persistent local browser storage for the knowledge base.

Why This Project?

SUKOSHI is an ongoing exploration into creating autonomous, learning entities. It demonstrates how relatively simple rules and client-side technologies can lead to complex, emergent behavior. The project is designed as a tangible, interactive showcase of these concepts, drawing inspiration from biological systems that thrive by efficiently adapting to their environment.

Support & Feedback:

This is an experimental project, and your insights are invaluable!

  • Encountered a bug or an unexpected quirk? I'd love to hear about it! All feedback helps refine the experiment.

Ready to explore? Play/Experiment with SUKOSHI now and see what big ideas it develops!

Development log

Leave a comment

Log in with itch.io to leave a comment.