Creating Mining Competition on regtest As we know ,  Bitcoin core-Regtest is used to set up our own blockchain starting from Genesis Block. I have created Two nodes on my localhost running on different ports (I am using Windows 8.1). They are connected to each other. Now I want to increase the difficulty level and create mining competition between two nodes. 

I can manually use generate Number_of_blocks to mine that many Number_of_blocks on any node and It also includes my recent transactions which are not yet included in the blockchain while mining. 

But how can have such an arrangement in which I will increase difficulty and start mining on both the nodes, and whoever comes first will broadcast the block and win the race.??

Any reference or step by step explanation would be much appreciated
Previous versions of bitcoin core included a miner, and you could use the RPC call setgenerate to activate it. However, this functionallity was removed on Bitcoin Core v0.13.0. In any case, this does does not seem to work on regtest (I have tried it with v0.11.1 and it returns a message saying to use generate instead).

Whenever I need to "simulate" nodes competing to mine in a regtest network, I define their mining power and randomly select which one of them is going to mine taking into account their defined mining power. Then, I send a generate 1 RPC call to the miner that has been selected.