Idea Summary
I propose a native Oracle APEX capability that allows developers to automatically explore and optimize page layouts using evolutionary algorithms.
The idea is to integrate genetic algorithms into APEX's declarative development experience. A PL/SQL engine could manage selection, crossover, mutation, elitism, and evolutionary history, while browser-based measurements evaluate accessibility, responsiveness, and visual hierarchy.
Generative AI would not be required, although AI-assisted mutations could be optional.
I have explored this concept through APEX Genesis, an open-source experiment implementing database-controlled genetic evolution, immutable interface genomes, fitness evaluation, and supervised autonomous execution.
Use Case
Consider an enterprise APEX dashboard containing charts, reports, KPI cards, and filters.
Instead of manually testing dozens of layouts, developers could:
- Select a page or specific regions.
- Define which attributes may evolve.
- Configure optimization objectives and constraints.
- Generate and compare alternative layouts.
- Preview results across desktop, tablet, and mobile.
- Inspect mutations, generations, and fitness scores.
- Apply a selected layout safely.
This would help developers optimize complex interfaces without changing business logic or automatically modifying production applications.
Preferred Solution (Optional)
Introduce a "Layout Evolution" feature in APEX Page Designer with:
- Declarative genomes representing supported layout attributes.
- A PL/SQL genetic engine for controlled evolution.
- Automated fitness evaluation across screen sizes.
- An interactive explorer for comparing generations and mutations.
- Integration with APEX Working Copies for safe, reversible changes.
- Optional AI-guided mutations.
An initial implementation could focus on Universal Theme layouts rather than unrestricted interface generation.
Working Proof of Concept
I developed APEX Genesis using Oracle APEX, PL/SQL, and Playwright.
The project includes 15 experimental runs and 18,180 candidate records comparing genetic evolution, Claude Haiku-assisted evolution, and random search.
Interestingly, AI assistance did not improve final best-so-far fitness in the five paired comparisons. These scores represent engineering metrics, not validated human usability.
The current prototype evolves constrained synthetic dashboards rather than arbitrary existing APEX applications.
GitHub: https://github.com/B2DEV-TECH/apex-genesis
Interactive demo: https://b2dev.tech/genesis/index.html
Technical article: https://b2dev.tech/blog/apex-genesis-evolving-interfaces-plsql-claude
I believe this approach could introduce a valuable new direction for declarative interface optimization in Oracle APEX.