u/Moron_23James

Launched V1.0 of my C++ Engine on Lichess! (Alpha-Beta, ID, QS) - Starting Move Ordering next and would love architecture advice.

Launched V1.0 of my C++ Engine on Lichess! (Alpha-Beta, ID, QS) - Starting Move Ordering next and would love architecture advice.

Hi everyone, I'm a beginner engine dev and I finally got my engine communicating via UCI and playing live games.

Current State: > - Standard Alpha-Beta with Iterative Deepening

  • Quiescence Search implemented
  • Basic material counting evaluation

I know it's practically blind right now. My goal for the next 3 days is to implement Phase 1 of Move Ordering (TT move extraction and MVV-LVA for captures) before I even touch things like NMP or LMR. Long-term goal is to hook up an NNUE.

Before I start writing the sorting pipeline, I’d love some harsh feedback on my core C++ search loop. Are there any glaring inefficiencies in my memory management or Iterative Deepening structure that will bottleneck me when I start adding pruning heuristics?

Repo:https://github.com/Lak23James/ChessEngineBot:https://lichess.org/@/Lakshya_beep_bop_bot

Thanks in advance for the help, this community has been a goldmine of information.

https://preview.redd.it/mbhb2r7o0u1h1.png?width=1920&format=png&auto=webp&s=f114d667d5a82a26187566b067a7b8bf85bc5ae8

reddit.com
u/Moron_23James — 5 days ago

Launched V1.0 of my C++ Engine on Lichess! (Alpha-Beta, ID, QS) - Starting Move Ordering next and would love architecture advice.

Hi everyone, I'm a beginner engine dev and I finally got my engine communicating via UCI and playing live games.

Current State: > - Standard Alpha-Beta with Iterative Deepening

  • Quiescence Search implemented
  • Basic material counting evaluation

I know it's practically blind right now. My goal for the next 3 days is to implement Phase 1 of Move Ordering (TT move extraction and MVV-LVA for captures) before I even touch things like NMP or LMR. Long-term goal is to hook up an NNUE.

Before I start writing the sorting pipeline, I’d love some harsh feedback on my core C++ search loop. Are there any glaring inefficiencies in my memory management or Iterative Deepening structure that will bottleneck me when I start adding pruning heuristics?

Repo:https://github.com/Lak23James/ChessEngineBot:https://lichess.org/@/Lakshya_beep_bop_bot

Thanks in advance for the help, this community has been a goldmine of information.

https://preview.redd.it/mbhb2r7o0u1h1.png?width=1920&format=png&auto=webp&s=f114d667d5a82a26187566b067a7b8bf85bc5ae8

reddit.com
u/Moron_23James — 5 days ago
▲ 20 r/iitbhu+1 crossposts

Built a C++ Chess Engine from scratch instead of doing web dev (Need feedback!)

Hey everyone, wanted to share what I've been building over the holidays. I'm in my first year and realized every resume looks the same with generic web apps, so I decided to dive into low-level systems and build a chess engine from scratch in C++.

I just got it connected to the Lichess servers via the UCI protocol. Right now it uses Alpha-Beta pruning, Iterative Deepening, and Quiescence Search. It's basically a super-fast calculator that doesn't understand chess strategy yet.

I'm planning to write the Move Ordering pipeline today, and eventually hook it up to a PyTorch Neural Network (NNUE).

If any seniors here have experience with high-performance C++ or AI inference, I’d love a code roast on my repo. Or just drop by Lichess and get some free Elo from my bot before I make it too strong!

https://preview.redd.it/7fqt6wta0u1h1.png?width=1920&format=png&auto=webp&s=e007615a85dd27fd3705e5288187815c334deb3a

Repo:https://github.com/Lak23James/ChessEngine
Bot: https://lichess.org/@/Lakshya_beep_bop_bot

reddit.com
u/Moron_23James — 5 days ago

Integrating 3D Heat Equation into a PINN for Real-Time Aerospace Simulation (C++ WASM Engine)[P]

Hey everyone,

I’ve been exploring Physics-Informed Neural Networks (PINNs) to solve high-velocity thermal problems. I built Met-Shield, a re-entry simulator that uses a PINN to predict thermal gradients on a spacecraft shield.

The PINN Phase:

  • Architecture: I’m using a fully connected network trained to satisfy the 3D Heat Equation as its primary loss function.
  • Physics Constraints: The model is constrained by the thermal diffusivity and conductivity of Ti-6Al-4V (Titanium alloy).
  • The Goal: I wanted to see if a PINN could provide more robust generalization than a standard FDM solver when dealing with noisy atmospheric trajectory data.

The Performance Handoff: Once trained, I integrated the model logic into a custom C++ engine compiled to WebAssembly. This allows the simulation to run natively in the browser at 60fps, predicting metallurgical phase transitions (Alpha-to-Beta Titanium) on the fly.

The Struggle: While the PINN's math is solid, I’m seeing some convergence issues when the heat flux spikes during the "Max Q" phase of re-entry. I’m also looking for advice on better ways to weight the physics-loss vs. the data-loss in the total loss function.

I’ve open-sourced the repo and would love for some ML engineers to look at my training loop and architecture.

met-shield-58n1.vercel.app
u/Moron_23James — 9 days ago

Integrating 3D Heat Equation into a PINN for Real-Time Aerospace Simulation (C++ WASM Engine)[P]

Hey everyone,

I’ve been exploring Physics-Informed Neural Networks (PINNs) to solve high-velocity thermal problems. I built Met-Shield, a re-entry simulator that uses a PINN to predict thermal gradients on a spacecraft shield.

The PINN Phase:

  • Architecture: I’m using a fully connected network trained to satisfy the 3D Heat Equation as its primary loss function.
  • Physics Constraints: The model is constrained by the thermal diffusivity and conductivity of Ti-6Al-4V (Titanium alloy).
  • The Goal: I wanted to see if a PINN could provide more robust generalization than a standard FDM solver when dealing with noisy atmospheric trajectory data.

The Performance Handoff: Once trained, I integrated the model logic into a custom C++ engine compiled to WebAssembly. This allows the simulation to run natively in the browser at 60fps, predicting metallurgical phase transitions (Alpha-to-Beta Titanium) on the fly.

The Struggle: While the PINN's math is solid, I’m seeing some convergence issues when the heat flux spikes during the "Max Q" phase of re-entry. I’m also looking for advice on better ways to weight the physics-loss vs. the data-loss in the total loss function.

I’ve open-sourced the repo and would love for some ML engineers to look at my training loop and architecture.

https://preview.redd.it/enkuqo7vg11h1.png?width=1920&format=png&auto=webp&s=7c69248a43e9c0488015ebbad1c78d6079c43e5f

https://preview.redd.it/auh9uq6wg11h1.png?width=1920&format=png&auto=webp&s=5cb270a224012c68f33d0897fbd66742bb7a5152

Repo:https://github.com/Lak23James/met-shield
Live Site:https://met-shield-58n1.vercel.app/

reddit.com
u/Moron_23James — 9 days ago

C++ WASM Physics Engine + R3F: Help me fix my "PS1-era" spacecraft shaders!

Body: Hey everyone, I’m working on Met-Shield, a spacecraft re-entry simulator. I’ve built a heavy backend, but I’m struggling to make the Three.js visuals match the quality of the data.

What’s happening under the hood:

  • WASM Bridge: I have a C++ engine compiled to WASM that solves the 3D Heat Equation for an 8x8x12 voxel grid. It streams a Float32Array of 64 temperatures every frame.
  • The Visualization: I’m using InstancedMesh in React-Three-Fiber to render a thermal heatmap on the spacecraft.

The Problem: I’m struggling with the "glow" and the shaders. The Blackbody radiation (emissive intensity) keeps getting washed out by my lighting setup, and mapping the trajectory spline (CatmullRomCurve3) around the Earth is giving me jittery results when using the timeline slider.

I’m an engineer, not a Technical Artist, and it shows. I’ve open-sourced the code—could someone look at my HeatShield.jsx and tell me why my emissive mapping looks so flat?

https://preview.redd.it/utruwv6of11h1.png?width=1920&format=png&auto=webp&s=372134bb9c166d15ca93ed6d206dbd49e96d14e5

https://preview.redd.it/tjt1wc5pf11h1.png?width=1920&format=png&auto=webp&s=ac0ff940f5bc96c1b486b975a143eb3a2406f97c

Repo:https://github.com/Lak23James/met-shield
Demo:https://met-shield-58n1.vercel.app/

reddit.com
u/Moron_23James — 9 days ago

The C++ to JS bridge, memory management, and 60fps performance.

wanted to see if I could run a high-fidelity thermal solver in the browser without a Python/Matlab backend.

The Engine:

  • Written in C++, compiled via Emscripten.
  • Uses an explicit Finite Difference Method (FDM) to solve the 3D Heat Equation.
  • Integrates a PINN (Physics-Informed Neural Network) for predictive thermal modeling.
  • Tracks Alpha-to-Beta phase transitions in Titanium alloy (Ti-6Al-4V) in real-time.

The Issue: While the WASM bridge is incredibly fast (60fps easily), I’m having trouble with the handoff to the Three.js frontend. Rendering the 64-voxel heatmap in real-time is creating some overhead I didn't expect.

If anyone has tips on optimizing the memory bridge for high-frequency data updates between WASM and WebGL, I’d love to hear them.

GitHub:https://github.com/Lak23James/met-shieldVercel:https://met-shield-58n1.vercel.app/

u/Moron_23James — 9 days ago

Open Source Spacecraft Re-entry Simulator (PINN + Titanium Phase Transition Model)

Hello r/aerospace, I’ve been developing a browser-based "Digital Twin" for re-entry vehicles called Met-Shield.

https://preview.redd.it/6it0pjo1f11h1.png?width=1920&format=png&auto=webp&s=0bbedd83329fbf6040ce6cdd930b81009809575b

https://preview.redd.it/3lyx3l72f11h1.png?width=1920&format=png&auto=webp&s=98b21971831382e5de65d4fa179b4f4bf00e776a

The Scientific Phases:

  1. Aerothermodynamics: Using Sutton-Graves for convective heat flux calculations based on entry velocity and altitude.
  2. Thermal Diffusion: A C++ solver tracking heat through an 8x8x12 grid.
  3. Metallurgy: The simulation specifically models the Alpha-to-Beta phase transition (1250 K) of Titanium (Ti-6Al-4V) and flags structural integrity risks before the melting point is reached.

The Help Needed: The UI is a work in progress, but I want to ensure my math holds up. Is Sutton-Graves too simplified for a proof-of-concept like this? Also, if anyone has better thermal diffusivity constants for aerospace-grade Titanium under high-stress re-entry, please let me know.

Live Simulation:https://met-shield-58n1.vercel.app/

reddit.com
u/Moron_23James — 9 days ago

Building a Spacecraft Physics Engine in C++ (WASM) but failing at 3D Graphics. Help a fellow student out!

I I have spent the last few weeks exploring the limits of browser-based simulation with Met-Shield—a real-time thermal protection system (TPS) dashboard for spacecraft re-entry. The goal was to see if I could bypass a server entirely and run heavy aerospace physics natively in the client.

The Project Phases:
🔹 Phase 1: Aerothermodynamics – Using the Sutton-Graves equation to model heat flux based on orbital trajectory data (altitude, velocity, air density).
🔹 Phase 2: PINN Engine – I trained a Physics-Informed Neural Network to satisfy the 3D Heat Equation, ensuring the simulation obeys the laws of thermodynamics.
🔹 Phase 3: The WASM Core – I wrote a custom voxel solver in C++ and compiled it to WebAssembly to handle the thermal gradients across a Ti-6Al-4V (Titanium) matrix in real-time.
🔹 Phase 4: Metallurgical Analysis – Tracking the Alpha-to-Beta phase transitions (1250 K) to predict structural integrity loss before melting.
m struggling to make the 3D visualization feel as high-tech as the backend data. The "Trajetory View" and the "Spacecraft Heatmap" need a serious visual overhaul.

I’d love some feedback on the UI layout—does it feel like professional aerospace software? What would you change to make it more intuitive?
Also if there is some logical error in engine or the PINNs .If you could check it and find it ,Please do let it . I would be grateful to you

Demo:https://met-shield-58n1.vercel.app/
Source:https://github.com/Lak23James/met-shield

reddit.com
u/Moron_23James — 9 days ago

Building a Spacecraft Physics Engine in C++ (WASM) but failing at 3D Graphics. Help a fellowmate out!

Hey guys, first-year student here. I’ve been obsessing over spacecraft re-entry and decided to build Met-Shield.

I wanted to explore if we could do real-time physics in a browser. I managed to write a C++ engine that solves the Heat Equation and handles Titanium phase shifts, but man, Three.js is hard.
🔹 Phase 1: Aerothermodynamics – Using the Sutton-Graves equation to model heat flux based on orbital trajectory data (altitude, velocity, air density).
🔹 Phase 2: PINN Engine – I trained a Physics-Informed Neural Network to satisfy the 3D Heat Equation, ensuring the simulation obeys the laws of thermodynamics.
🔹 Phase 3: The WASM Core – I wrote a custom voxel solver in C++ and compiled it to WebAssembly to handle the thermal gradients across a Ti-6Al-4V (Titanium) matrix in real-time.
🔹 Phase 4: Metallurgical Analysis – Tracking the Alpha-to-Beta phase transitions (1250 K) to predict structural integrity loss before melting.

The backend is good i think, but the frontend looks a bit rough. I’m sharing the repo and the Vercel link because I want to learn how to make this look " professional. If any of you are into WebGL or Three.js, please check it out and give me some tips on how to fix the visuals.
Also if you think my logic in engine or the PINNs training is wrong or logic in the PINNs .Please approach me I tried pretty hard on this project.

https://preview.redd.it/zv1iqi5fd11h1.png?width=1920&format=png&auto=webp&s=9052e076c56e7f0866f516506a4b77cc7776b00b

https://preview.redd.it/ffvjddjgd11h1.png?width=1920&format=png&auto=webp&s=a58d8ec114c24ae16584f7742d406d6586b986f1

Repo:https://github.com/Lak23James/met-shield
Live Site:https://met-shield-58n1.vercel.app/

reddit.com
u/Moron_23James — 9 days ago