Jeff Hornacek started undrafted rookie Ron Baker in the backcourt and finished Monday’s game against the Magic with undrafted rookie guard Chasson Randle on the floor.

The Knicks coach isn’t committing to a youth movement — yet — but Hornacek is committed to playing who’s performing well and gives the team the best chance to win that particular game.

Hornacek is trying to win. Players and coaches don’t tank for a higher draft pick; that’s an organizational decision. But Hornacek said management hasn’t instructed him to play the young guys more. If it happens organically, that’s a plus.

Hornacek has shown if the younger guys are playing well he’ll stay with them over the veterans or starters. It worked against the 23-40 Magic.

Derrick Rose sat the entire fourth quarter as Randle helped spark a 23-4 run in the Knicks’ 113-105 win. The game before, Carmelo Anthony sat for more than nine minutes in the second quarter when the second unit turned an 11-point deficit into a three-point lead on Golden State.

Anthony didn’t play Monday because of left knee soreness, and Kristaps Porzingis sat for the first 8:23 of the fourth with four fouls. He could have come in sooner, but Hornacek said the group was “rolling.”

Subscribe to Newsday’s sports newsletter Receive stories, photos and videos about your favorite New York teams plus national sports news and events. By clicking Sign up, you agree to our privacy policy.

“Some nights that’s going to happen,” he said. “They enjoyed playing together. They moved the ball and didn’t try to do too much. The other guys stepped up.”

The ball usually moves better without Anthony and Rose, the Knicks’ two primary scorers. That doesn’t always equal a win — especially against stronger teams — but it did against Orlando.

The Knicks were on a high after the win. Hornacek signed several autographs and took some selfies with fans. The locker room was loose. They were happy to have pulled out the victory.

It kept the Knicks 5 ½ games out of the last playoff spot with 18 to play. Their odds of making the postseason are very long. But they’re trying to stay alive as long as possible, hoping to make something happen.

“We’re not trying to tank, we’re trying to win,” Courtney Lee said. “There’s still a possibility. There’s still hope. I just know, not only for myself, I know the guys in here once you start something you want to finish it.

“The only thing that came up in our locker room is, ‘Let’s continue to fight. We still have a chance.’ We try to win them all and then whatever happens happens. Let the basketball gods handle that and just know that we did everything that we could.”

Anthony is expected back Wednesday in Milwaukee so Baker will return to the bench. But Hornacek said Randle “earned” more playing time after his seven-point, five-rebound, five-assist night in Orlando.

Randle, who was signed Feb. 27 after Brandon Jennings was waived, helped get the Knicks into their offense and played tough defense. The remarkable stat from Monday’s game: Randle was a plus-27 and Rose a minus-23.

“I just tried to play with energy, play with effort and make the right play,” Randle said.

The Knicks signed Randle for the rest of this season and with a partially guaranteed team option for next year. There’s a good chance he’ll stick and be this year’s version of Langston Galloway, a free-agent guard who made a surprising contribution.

Randle knows the triangle from playing it at Stanford, and probably wouldn’t have been cut in camp if he hadn’t fractured his orbital bone. When the 76ers waived him, the Knicks quickly brought him back.

“We always felt when he becomes available we want to try and get him back,” Hornacek said. “He just knows how to play, does the little things.”

“He’s a guy that is always going to bring energy,” Porzingis said. “He is able to drive to the basket and kick out for shooters. He’s really quick and able to stay in front of guys. He’s the type of player that can help you win games.”