Before randomly placing the platforms you need to take into consideration some important values:
- Character's height
- Character's width
- Jump's maximum height
- Jump's maximum distance
- Minimum distance to run for optimal jump between platforms at the same level
With that in mind you craft your platform generator floor by floor, starting by the ground floor and taking it as a platform.
- Character's height < vertical distance < jump's maximum height
- Character's width < horizontal distance < jump's maximum distance
- Character's width < platform width < (max horizontal space - character's width)
- If maximum horizontal distance in same floor > threshold, ensure one of the platforms complies with the minimum distance to run for taking that optimal jump
- If maximum horizontal distance in previous floor > threshold, don't place a platform above the gap in order to avoid a jump collision that disables the player to properly jump that gap
There would be more rules and considerations (e.g. placing spikes), but those are what comes to mind right now for starters.
Note: I'm not taking into account the height of the platforms just to make the rules cleaner.
Take into consideration that depending on the approach rules addition, this could be a complex problem in terms of computational theory, making it CPU-intensive. In that case, it could be seen as a CSP problem, but this first approach look suitable because the computations are bond to same-level platform and two floors at the same time (current and previous).
Just like Mario said, the approach of making hand-crafted platform blocks is less CPU-intensive and making it easier to place random platforms in real time. However, the trade-off would be to invest time creating and tuning those platform blocks (considering the rules above).