@@ -205,56 +205,26 @@ void OnProgress(nuint p)
205205 void Log ( string s ) =>
206206 OnLog ? . Invoke ( s ) ;
207207
208- if ( ! Config . MinimizeSteps )
208+ Raphael . SolverConfig config = new ( )
209209 {
210- Raphael . SolverConfig config = new ( )
211- {
212- Adversarial = Config . Adversarial ,
213- BackloadProgress = true ,
214- UnsoundBranchPruning = true ,
215- LogLevel = Raphael . LevelFilter . Debug ,
216- ThreadCount = ( ushort ) Config . MaxThreadCount ,
217- } ;
218-
219- using var solver = new Raphael . Solver ( in config , in input , pool ) ;
220-
221- solver . OnFinish += OnFinish ;
222- solver . OnSuggestSolution += OnSuggestSolution ;
223- solver . OnProgress += OnProgress ;
224- solver . OnLog += Log ;
225-
226- progressStage = 0 ;
227- progress = 0 ;
228- await using var registration = Token . Register ( solver . Cancel ) . ConfigureAwait ( true ) ;
229- await Task . Run ( solver . Solve , Token ) . ConfigureAwait ( true ) ;
230- Token . ThrowIfCancellationRequested ( ) ;
231- }
210+ Adversarial = Config . Adversarial ,
211+ BackloadProgress = Config . BackloadProgress ,
212+ LogLevel = Raphael . LevelFilter . Debug ,
213+ ThreadCount = ( ushort ) Config . MaxThreadCount ,
214+ } ;
232215
233- var state = solution != null ? ( SimulationState ? ) ExecuteActions ( solution ) : null ;
234- if ( solution == null || state ? . Quality != state ? . Input . Recipe . MaxQuality )
235- {
236- Raphael . SolverConfig config = new ( )
237- {
238- Adversarial = Config . Adversarial ,
239- BackloadProgress = Config . BackloadProgress ,
240- UnsoundBranchPruning = false ,
241- LogLevel = Raphael . LevelFilter . Debug ,
242- ThreadCount = ( ushort ) Config . MaxThreadCount ,
243- } ;
244-
245- using var solver = new Raphael . Solver ( in config , in input , pool ) ;
246-
247- solver . OnFinish += OnFinish ;
248- solver . OnSuggestSolution += OnSuggestSolution ;
249- solver . OnProgress += OnProgress ;
250- solver . OnLog += Log ;
251-
252- progressStage = 0 ;
253- progress = 0 ;
254- await using var registration = Token . Register ( solver . Cancel ) . ConfigureAwait ( true ) ;
255- await Task . Run ( solver . Solve , Token ) . ConfigureAwait ( true ) ;
256- Token . ThrowIfCancellationRequested ( ) ;
257- }
216+ using var solver = new Raphael . Solver ( in config , in input , pool ) ;
217+
218+ solver . OnFinish += OnFinish ;
219+ solver . OnSuggestSolution += OnSuggestSolution ;
220+ solver . OnProgress += OnProgress ;
221+ solver . OnLog += Log ;
222+
223+ progressStage = 0 ;
224+ progress = 0 ;
225+ await using var registration = Token . Register ( solver . Cancel ) . ConfigureAwait ( true ) ;
226+ await Task . Run ( solver . Solve , Token ) . ConfigureAwait ( true ) ;
227+ Token . ThrowIfCancellationRequested ( ) ;
258228
259229 if ( solution == null )
260230 return new ( [ ] , State ) ;
0 commit comments