InSilico - AI Algorithm Simulator

From natural language to high-performance code, seamlessly test, optimize, and generate your AI algorithms—powered by Google Gemini ✨.

[Project Name] Showcase

Project Overview

In the fields of data science and AI, the process of designing, prototyping, and testing algorithms often requires switching between multiple tools and environments, which can be cumbersome and time-consuming. For beginners or developers seeking to rapidly validate ideas, writing algorithmic code from scratch presents a significant hurdle. "InSilico" is designed to revolutionize this workflow by providing a one-stop, web-based platform that offers an integrated development and simulation environment.

The platform's core is an "AI-Augmented Algorithm Workflow." By deeply integrating with Google Gemini, InSilico translates natural language descriptions from developers directly into executable JavaScript code and can, in reverse, explain the logic of complex algorithms. Combined with a secure sandboxed execution environment, quantitative performance metrics, and flexible data source support, InSilico is committed to creating a seamless, efficient, and intelligent experimental platform—from conceptualization to performance validation—significantly lowering the barrier to entry for developing and learning AI and data processing algorithms.

Key Features & Solutions

  • Concept & Implementation: Users simply describe a desired algorithm in natural language (e.g., "calculate a 5-day simple moving average"). Upon clicking "Generate Code," the frontend securely sends the request via gemini-proxy.php to the Google Gemini API. The PHP proxy ensures the API key remains secure on the server. The JavaScript code returned by Gemini is then automatically populated into the CodeMirror editor, enabling rapid "idea-to-code" prototyping.
  • Concept & Implementation: To accelerate learning and code comprehension, users can select code within the editor and click "Explain Code". The application again calls the Gemini API, which analyzes the algorithm's logic, inputs, and outputs, providing a clear, natural-language explanation in a pop-up modal window (Modal).
  • Concept & Implementation: The security and performance of user-submitted code are paramount. To prevent flawed or malicious code from freezing the main browser thread, this project utilizes a Web Worker. All algorithms are executed in an isolated background thread, complete with a timeout mechanism (SIMULATION_TIMEOUT), ensuring the main UI remains responsive and secure.
  • Concept & Implementation: Providing tangible performance data is fundamental for optimization. Within the Web Worker, performance.now() is used to precisely calculate the algorithm's execution time (executionTime). The simulation results—including execution time, a placeholder for memory usage, and a scenario-defined accuracy metric (accuracyMetric)—are clearly displayed on the results page. Chart.js is leveraged to visually compare the "Actual Data" input against the "Predicted Data" output, making performance evaluation intuitive.

Project Details

  • My Role:Maker/Owner
  • Duration:2025 Q2
  • Tools Used:Gemini,vscode,React

Technology Stack

#Google Gemini#PHP