AI-powered decision support system for rehabilitation robotics and gait analysis
Developed for the AI Hackathon for People with Disabilities
King Salman Center for Disability Research Β· Riyadh Β· June 14, 2026
Prof. Dr. Utku KΓΆse Β· IEEE Senior Member Β· ACM Professional Member
SΓΌleyman Demirel University Β· University of North Dakota Β· VelTech University Β· Universidad Panamericana
- Overview
- Live Demo
- Key Features
- AI Architecture
- Scenario System
- Patient Analysis Module
- Robotics & Simulation Module
- Clinical Evidence Base
- Technical Architecture
- Repository Structure
- Running Locally
- API Keys (Optional)
- Clinical Disclaimer
- References
MoGAIT is a single-file, browser-based AI platform that integrates neural network-driven patient synthesis, explainable AI (XAI), rehabilitation robotics decision support, and multi-scenario mobility simulation β all without a server, database, or installation.
It was designed to answer a practical question at the intersection of AI and disability research: "Given this patient's profile, in this specific real-world context, which rehabilitation robot should be used, how should it be controlled, and what outcome can be expected?"
The system addresses clinical, community, and mass-gathering mobility scenarios β including Hajj pilgrimage, post-stroke gait rehabilitation, paediatric mobility, and 13 other real-world contexts.
No installation. No sign-up. Works on Chrome, Edge, Firefox (desktop).
Quick start:
- Enter a patient count (e.g. 30) β click Generate
- Select any scenario from the strip (try Hajj / Pilgrimage or Gait Recovery)
- Click any patient card on the left to open their full analysis
- Switch to Robotics & Simulation tab for device matching, simulation, and planning
| Module | What it does |
|---|---|
| Synthetic Cohort Generation | VAE+MLP generates realistic patient cohorts (10β200 patients) across 8 diagnosis groups |
| Multi-Domain Risk Profiling | 6-dimension risk profile: Fall Risk, Fatigue, Pain Impact, Mobility Score, Participation Index, Rehab Potential |
| Scenario-Adaptive XAI | Feature importance re-weighted per scenario β same patient, different scenario = different XAI priorities |
| Counterfactual XAI | Interactive sliders simulate clinical interventions: "If we improve gait speed to 0.9 m/s, risk drops by X" |
| Device Match | 6 robot types matched to patient by diagnosis, scenario, and clinical indicators |
| Control Dynamics | 6 control algorithms visualised as patient-specific torque profiles over the gait cycle |
| Gait-Robot Interaction | Pre/post therapy hip flexion comparison with diagnosis-stratified RCT effect sizes |
| 4-Week Session Plan | Personalised rehabilitation plan with weekly targets, session intensity, and dual-axis progression chart |
| Cohort Simulation | 40-agent without-robot vs. with-robot comparative animation across 13 environments |
| Patient Simulation | Selected patient starred (β ) in both panels; live fall count, speed gain, and fatigue reduction |
| AI Clinical Advisor | Claude, Gemini, or GPT-4o generates scenario-aware clinical reasoning (BYOK) |
| 19 Scenarios | 13 primary + 6 faith & cultural gathering scenarios, each with independent XAI weights |
Latent vector z β βΒΉΒ² β [32] β [48] β [32] β [20] β Patient parameters
A VAE-style decoder generates 20 clinical parameters from a 12-dimensional random latent input. Each of the 8 diagnosis groups (stroke, SCI, CP, MS, amputation, elderly, TBI, Parkinson's) has group-specific priors for gait speed, asymmetry, variability, comorbidity burden, and energy cost. The network uses ReLU activations with sigmoid/tanh output clamping per parameter type.
Generated parameters include:
- Gait speed (m/s), step asymmetry (%), gait variability (CV%), cadence (spm)
- TUG test time (sec), stride length (m), double support time (%)
- Fall history (falls/year), pain score (VAS 0β10), energy cost (J/kg/m)
- Medications count, comorbidity list, age, BMI, SpOβ, heart rate
- Post-event week, WMCA classification
10 clinical inputs β [24] β [24] β [16] β [4] β Risk tier (Low / Moderate / High / Critical)
A 4-layer MLP classifies each patient into one of four risk tiers using 10 normalised inputs:
| Input | Normalisation | Clinical weight |
|---|---|---|
| Gait Speed | Γ· 1.4 | Fall risk inverse |
| Step Asymmetry | Γ· 70 | Compensation marker |
| TUG Test | Γ· 62 | Mobility threshold |
| Fall History | Γ· 10 | Strongest predictor |
| Pain Score | Γ· 10 | Compensation driver |
| Medications | Γ· 13 | Polypharmacy risk |
| Comorbidities | Γ· 10 | Systemic burden |
| Gait Variability | Γ· 17 | Pre-fall signal |
| Diagnosis Severity | categorical | Neurological grade |
| Age (normalised) | Γ· 90 | Physiological reserve |
A power-transform calibration (raw^0.72 Γ 88 + 5) prevents ceiling saturation and ensures a realistic clinical distribution (~30% low / ~40% moderate / ~30% high risk).
Each feature's contribution to risk is measured via finite-difference gradient sensitivity:
βrisk/βxα΅’ β [f(x + Ξ΅eα΅’) β f(x β Ξ΅eα΅’)] / 2Ξ΅, Ξ΅ = 0.001
These raw gradients are then re-weighted by the active scenario's SC_MODS vector β a 10-dimensional weight array that encodes which clinical features matter most in each scenario:
| Scenario | Top amplified features | Clinical rationale |
|---|---|---|
| Fall Prevention | β² Fall History (Γ1.6), β² TUG (Γ1.4) | Direct fall predictors |
| Exoskeleton Candidacy | β² Diagnosis (Γ1.7), β² Age (Γ1.5) | Device eligibility criteria |
| Sports Rehabilitation | β² Asymmetry (Γ1.7) | Limb Symmetry Index target |
| Hajj / Pilgrimage | β² Age (Γ1.6), β² Variability (Γ1.5), β² Comorbidity (Γ1.5) | Heat + crowd collapse risk |
| Energy & Fatigue | β² Variability (Γ1.4), β² Age (Γ1.5) | Fatigue compounds over time |
| Pain & Compensation | β² Pain (Γ1.8), β² Asymmetry (Γ1.5) | Compensatory gait patterns |
When a scenario is changed, the XAI panel updates instantly β the same patient shows different feature importances, with β² amber badges for amplified features and βΌ grey badges for depressed ones.
"If we improve this patient's gait speed from 0.64 m/s to 0.90 m/s via exoskeleton β how much does risk drop?"
Six interactive sliders allow simulation of clinical interventions. Each slider change re-runs RISK_NET instantly and displays the Ξ risk score. Each slider is labelled with the intervention that would achieve it (e.g., "Exoskeleton, treadmill training, walker" for gait speed).
This implements counterfactual reasoning β XAI showing not just which features matter, but how much changing them would help.
Three large language models are available via user-supplied API keys (BYOK β keys used only for the direct API call, never stored):
- Claude (Anthropic) β primary clinical reasoning
- Gemini (Google)
- GPT-4o (OpenAI)
The advisor receives the full patient profile, active scenario, XAI attribution results, and risk scores. It generates scenario-contextualised clinical interpretation including intervention priorities, safety flags, and monitoring plan.
MoGAIT supports 19 scenarios in two groups:
| Scenario | XAI Focus | Environment |
|---|---|---|
| π‘οΈ Fall Prevention | Fall history, TUG, polypharmacy | Home obstacle course |
| π Gait Recovery | Speed, asymmetry | Clinic parallel bars |
| π¦Ύ Exoskeleton Candidacy | Diagnosis severity, age | Clinic corridor |
| β‘ Energy & Fatigue | Variability, age | Community walking |
| βοΈ Pain & Compensation | Pain, asymmetry | Clinic |
| ποΈ Community Participation | Speed, participation | Urban street |
| π§ Neurological Rehab | Asymmetry, fall history | Clinic |
| π₯ Post-Surgical Mobility | Speed, polypharmacy | Hospital ward |
| ποΈ Sports Rehabilitation | Asymmetry (LSI) | Rehab gymnasium |
| π Hajj / Pilgrimage | Age, variability, comorbidity | Tawaf (Kaaba orbit) |
| πΆ Daily Community Walking | Speed, participation | Community |
| π Workplace Ergonomics | Pain, asymmetry | Factory/office |
| πΆ Paediatric Mobility | Diagnosis, participation | Clinic |
Accessible via the π Additional dropdown. All validated for robotic rehabilitation compatibility (flat terrain, controlled environments):
| Scenario | Notes |
|---|---|
| π Wailing Wall Plaza | Cobblestone, elderly pilgrims, hip-assist optimal |
| βοΈ Vatican Pilgrimage | St. Peter Square, prolonged standing |
| π Umrah (Off-peak) | Marble surface, off-peak Tawaf |
| ποΈ Lourdes Pilgrimage | Most accessible pilgrimage site globally |
| π€οΈ Camino (Urban Stages) | Flat paved sections, FDA-accessible routes |
| πΏ Medjugorje Pilgrimage | Gentle terrain, disability pilgrim infrastructure |
Note: Kumbh Mela was explicitly excluded β stampede risk, mud terrain, and no assistive robot infrastructure make it incompatible with exoskeleton use.
Generate 10β200 synthetic patients. The cohort overview shows:
- Population summary: avg risk, high/moderate/low distribution, avg speed, TUG, falls/yr, robot benefit
- Diagnosis distribution bar chart with per-diagnosis risk scores
- Highest-risk patients for immediate triage
- Search and filter by name or diagnosis group
Selecting a patient reveals:
Gait Parameters β Chart.js multi-axis chart showing Hip, Knee, and Ankle flexion angles across the gait cycle, with normative Winter (2009) reference curves and patient Left vs. Right (paretic) differentiation. Step asymmetry and variability are embedded directly in the curve shape.
Multi-Domain Risk Profile β 6-bar MLP-computed profile:
- Fall Risk β RISK_NET output
- Fatigue Risk β energy cost Γ age weighted
- Pain Impact β VAS pain Γ compensation index
- Mobility Score β ICF d4 proxy (speed Γ cadence)
- Participation Index β ICF d9 proxy (ambulation safety)
- Rehab Potential β neuroplasticity window Γ age
Clinical Flags & Comorbidities
Automated flagging of High TUG Score, Polypharmacy, Fall History, and comorbidities. Physiological markers include heart rate, SpOβ, energy cost (J/kg/m), and muscle activation (%MVC) for five muscle groups.
Evidence-Based Interventions
Scenario-adaptive intervention priorities with:
- Priority level (Now / Soon)
- Intervention category and specific recommendation
- Full clinical rationale linked to patient parameters
- Level of evidence (Cochrane Level I / RCT Level II)
- In-line APA references
XAI Feature Attribution + 12-Week Trajectory
- Horizontal bar chart of 10 feature importances (absolute gradient magnitude)
- Scenario weight multipliers shown per bar (Γ1.7, Γ0.6 etc.)
- 12-week trajectory: gait speed (left axis), fall risk + participation index (right axis)
- Diagnosis-stratified recovery rates with plateau annotation
- Age and comorbidity modifiers applied to recovery slope
Counterfactual XAI
AI Clinical Advisor
Population-level analysis shows all 6 robot types with:
- Eligible patient count + % of cohort
- Projected speed gain, fall risk reduction, energy saving
- Scenario compatibility badges: β For this scenario (teal) / β Not recommended (red)
- Clinical indication, best scenarios, full verified APA reference
Individual patient view (Device Match tab) computes compatibility scores (0β100) based on diagnosis, gait speed, age, and clinical setting β sorted by suitability.
Supported robot types:
| Robot | Example | Best for |
|---|---|---|
| π₯ Tethered Exoskeleton | Lokomat Pro | Stroke, SCI, TBI (inpatient) |
| π¦Ύ Wearable Exoskeleton | EksoGT / ReWalk | SCI, stroke (community) |
| π Hip-Assist Robot | GEMS / EX1 | Elderly, prolonged walking |
| π¦Ώ Smart Orthosis | REEV DREEVEN | Foot drop, MS, CP |
| π© End-Effector Robot | Lokohelp / G-EO | Gait initiation, spasticity |
| βοΈ Functional Trainer | AlterG / PDSYS | Sports rehab, body-weight support |
Six control algorithms are selectable via card UI, each producing a characteristically different torque profile over the gait cycle:
| Algorithm | Torque characteristic | Complexity |
|---|---|---|
| Position Control | Rigid step shape at stance/swing transition | Low |
| Impedance Control | Smooth sinusoidal + damping term | Medium |
| Admittance Control | Phase-shifted, lags patient force | Medium |
| Adaptive Control | Decaying envelope as patient effort increases | High |
| AI Intent Control | Leads the movement by ~60 ms (predictive) | High |
| EMG-BMI Control | Irregular bursts, cortical-pathway driven | V.High |
Interactive sliders control stiffness (Kd), damping (Bd), max torque, and patient effort β the Chart.js chart re-renders in real time. Patient-specific modulation: the torque curve reflects this patient's actual gait speed, asymmetry, and variability.
Pre-therapy and post-therapy hip flexion angle compared against the Winter (2009) normative reference, rendered as a Chart.js multi-line chart. Post-therapy curves are computed from diagnosis-stratified RCT effect sizes (Mehrholz 2017, Lee et al. 2023).
Six outcome cards show projected 4-week gains: speed, fall risk, energy cost, TUG, step asymmetry, and energy saving β all with delta values vs baseline.
A personalised rehabilitation plan with:
- Week-by-week phase (Familiarisation β Guided Practice β Active Participation β Challenge & Transfer)
- Session frequency, duration, control algorithm, speed target, robot assist %, patient effort %
- Starting assist level personalised to risk tier (high-risk/SCI β 90%; standard β 75%)
- Chart.js mixed chart: session duration as bars, gait speed and assist/effort as dual-axis lines
Cohort Simulation β 40-agent side-by-side comparison:
- LEFT: WITHOUT robot β agents coloured by fall risk severity (π΄ high β₯65, π‘ moderate, π’ low)
- RIGHT: WITH robot β agents coloured by diagnosis group; robot type icon above each agent
- ROBOT ROSTER β live panel showing which patient uses which device
- Live HUD: falls, avg speed, avg fatigue per panel
- Live stats: falls prevented, speed gain, fatigue reduction, robot benefit factor
Patient Simulation β selected patient tracked individually:
- Patient highlighted with β star in both canvases
- Live 4-metric panel: Falls (no robot) / Falls (with robot) / Speed gain / Fatigue reduction
- Robot type matched to diagnosis (SCI β EksoGT π¦Ύ, Elderly β GEMS π , Stroke β Lokomat π₯...)
13 simulation environments including: clinical parallel bars, rehabilitation gymnasium, Tawaf (counterclockwise Kaaba orbit), cobblestone plaza, community street, hospital ward, workplace floor.
MoGAIT's parameters, effect sizes, and recommendations are grounded in peer-reviewed literature:
| Evidence item | Source |
|---|---|
| Electromechanical gait training: OR 1.94 for independent walking | Mehrholz et al. (2017), Cochrane |
| Hip-assist robot reduces energy cost 15β25% in elderly | Lee et al. (2023), Scientific Reports |
| AI-assisted rehabilitation superiority in MSK disorders | Luo et al. (2025), Front. Bioengineering |
| Gait speed <0.8 m/s: limited community ambulation threshold | Fritz & Lusardi (2009), JGPT |
| Gait variability: fall prediction sensitivity 80%+ | Hausdorff et al. (2001), Arch Phys Med |
| Step asymmetry >25%: hemiparetic compensation | Patterson et al. (2010), Arch Phys Med |
| Intent recognition in rehabilitation robots (systematic review) | Luo et al. (2024), Disabil Rehabil Assist Technol |
| Control algorithms review (2020β2024) | Rad & BriΘan (2025), Applied Sciences |
| AI-driven rehabilitation robotics | Abbas et al. (2025), Cureus |
| Hajj 2024: 1,301 heat deaths, pilgrim age 54.98 Β± 13.96 yrs | Alzaben et al. (2024), PLOS ONE |
| Hajj AI & crowd management | Alam et al. (2024), IEEE Access |
| Telestroke at Hajj 2023β2024 | Alfurayh et al. (2025), Front. Neurology |
| Aspect | Detail |
|---|---|
| Deployment | Single HTML file (index.html) β no server, no build step, no dependencies to install |
| File size | ~204 KB |
| Neural network | Pure JavaScript β GEN_NET (VAE decoder 12β32β48β32β20) + RISK_NET (MLP 10β24β24β16β4) |
| Chart engine | Chart.js 4.4.1 (loaded from cdnjs CDN) |
| Simulation | Canvas API β 40-agent animation, 13 environment renderers |
| XAI | Finite-difference gradient sensitivity, scenario-reweighted (SC_MODS 10-dim vector per scenario) |
| LLM integration | Direct browser β Anthropic / Google / OpenAI API calls (BYOK, keys never stored) |
| Data | All patient data is synthetically generated at runtime β no real patient data, no storage |
| Browser support | Chrome 90+, Edge 90+, Firefox 88+ (desktop) |
mogait/
βββ index.html # The entire application (single file)
βββ README.md # This file
βββ LICENSE # MIT
βββ images/ # Screenshots for README
βββ 1.png # Cohort Overview
βββ 2.png # Patient β Gait Parameters
βββ 3.png # Evidence-Based Interventions
βββ 4.png # Clinical Flags & Physiological Markers
βββ 5.png # XAI Attribution & 12-Week Trajectory
βββ 6.png # Counterfactual XAI
βββ 7.png # AI Clinical Advisor
βββ 8.png # Robotics β Population Device Match
βββ 9.png # Robotics β Individual Device Cards
βββ 10.png # Cohort Simulation
βββ 11.png # Individual Device Compatibility Scores
βββ 12.png # Control Dynamics Chart
βββ 13.png # Gait-Robot Interaction
βββ 14.png # 4-Week Session Plan
βββ 15.png # Patient Simulation
Since MoGAIT is a single HTML file, running it locally is trivial:
# Option 1 β just open the file
open index.html # macOS
start index.html # Windows
xdg-open index.html # Linux
# Option 2 β serve locally (avoids any CORS warnings)
python3 -m http.server 8080
# then open http://localhost:8080- Fork or clone this repository
- Go to Settings β Pages
- Source: Deploy from a branch β
mainβ/ (root) - Save β your live URL will be
https://yourusername.github.io/mogait/
The file must be named index.html for GitHub Pages to serve it automatically.
The AI Clinical Advisor requires API keys to function. These are entirely optional β all other features work without them.
- Click π API Keys in the scenario strip
- Enter one or more keys:
- Claude: get from console.anthropic.com
- Gemini: get from aistudio.google.com
- GPT-4o: get from platform.openai.com
- Keys are used only for the direct API call from your browser β never stored, never sent to any server other than the respective provider
MoGAIT generates synthetic data for research and demonstration purposes only.
All patient profiles are AI-generated. Clinical outcomes are illustrative estimates derived from published literature effect sizes, not predictions for any individual patient. This tool has not been validated for clinical decision-making and should not replace qualified clinical judgment.
Always consult licensed rehabilitation clinicians, physiotherapists, and physicians before making any clinical decisions.
-
Abbas, G. H., Speksnijder, C., Ramnarain, D., Parmar, C., Parmar, A., Ahmad, S., & Pouwels, S. (2025). AI-driven rehabilitation robotics: Advancements in and impacts on patient recovery. Cureus, 17(10), e94273. https://doi.org/10.7759/cureus.94273
-
Alam, M. S., Akbar, M. S., Iqbal, M. M., Jian, P., & Xiong, G. (2024). Enhancing Hajj and Umrah rituals and crowd management through AI technologies: A comprehensive survey. IEEE Access, 12, 161084β161120. https://doi.org/10.1109/ACCESS.2024.3487923
-
Alfurayh, N., et al. (2025). Telestroke management during the Hajj seasons 2023β2024: Insights from SEHA Virtual Hospital. Frontiers in Neurology. https://doi.org/10.3389/fneur.2025.1573275
-
Alzaben, A., Almutairi, N., & Alharthi, M. (2024). Health risk behaviors and associated factors among Hajj 2024 pilgrims: A multinational cross-sectional study. PLOS ONE, 19(11), e0314729. https://doi.org/10.1371/journal.pone.0314729
-
Fritz, S., & Lusardi, M. (2009). White paper: "Walking speed: The sixth vital sign." Journal of Geriatric Physical Therapy, 32(2), 2β5. https://doi.org/10.1519/00139143-200932020-00002
-
Hausdorff, J. M., Rios, D. A., & Edelberg, H. K. (2001). Gait variability and fall risk in community-living older adults: A 1-year prospective study. Archives of Physical Medicine and Rehabilitation, 82(8), 1050β1056. https://doi.org/10.1053/apmr.2001.24893
-
Lee, S.-H., Kim, J., Lim, B., Lee, H.-J., & Kim, Y.-H. (2023). Exercise with a wearable hip-assist robot improved physical function and walking efficiency in older adults. Scientific Reports, 13(1), 7269. https://doi.org/10.1038/s41598-023-32335-8
-
Luo, S., Meng, Q., Li, S., & Yu, H. (2024). Research of intent recognition in rehabilitation robots: A systematic review. Disability and Rehabilitation: Assistive Technology, 19(4), 1307β1318. https://doi.org/10.1080/17483107.2023.2170477
-
Luo, Z., Zhang, Y., Liu, T., & Wang, W. (2025). Effectiveness of artificial intelligence-assisted rehabilitation for musculoskeletal disorders: A network meta-analysis. Frontiers in Bioengineering and Biotechnology, 13, 1660524. https://doi.org/10.3389/fbioe.2025.1660524
-
Mehrholz, J., Thomas, S., Werner, C., Kugler, J., Pohl, M., & Elsner, B. (2017). Electromechanical-assisted training for walking after stroke. Cochrane Database of Systematic Reviews, 2017(5), CD006185. https://doi.org/10.1002/14651858.CD006185.pub4
-
Patterson, K. K., Parafianowicz, I., Danells, C. J., Closson, V., Verrier, M. C., Staines, W. R., Black, S. E., & McIlroy, W. E. (2010). Gait asymmetry in community-ambulating stroke survivors. Archives of Physical Medicine and Rehabilitation, 91(2), 205β212. https://doi.org/10.1016/j.apmr.2009.10.023
-
Rad, A.-B., & BriΘan, C. (2025). Control algorithms in robot-assisted rehabilitation: A systematic review. Applied Sciences, 15(16), 9184. https://doi.org/10.3390/app15169184
-
Rahmani, A. (2024). Artificial intelligence and its revolutionary role in physical and mental rehabilitation. BioMed Research International, 2024, 9554590. https://doi.org/10.1155/2024/9554590
Prof. Dr. Utku KΓΆse
utkukose@sdu.edu.tr Β· ukose@up.edu.mx
utkukose.com Β· ORCID: 0000-0002-9652-6415
AI Hackathon for People with Disabilities Β· King Salman Center for Disability Research Β· June 14, 2026













