Random Generator
Posted: Tue Apr 28, 2015 4:45 pm
Hi,
Based on the foraging.argos we are able to randomly generate food items in a area with a pre-determined location using the following codes:
m_pcRNG = CRandom::CreateRNG("argos");
for(UInt32 i = 0; i < unFoodItems; ++i) {
m_cFoodPos.push_back(
CVector2(m_pcRNG->Uniform(m_cForagingArenaSideX),
m_pcRNG->Uniform(m_cForagingArenaSideY)));
i will like to ask if is possible for us to generate a random location for the area where the food was generated in using the random generators functions provided.
Thank you
Cheers,
Max
Based on the foraging.argos we are able to randomly generate food items in a area with a pre-determined location using the following codes:
m_pcRNG = CRandom::CreateRNG("argos");
for(UInt32 i = 0; i < unFoodItems; ++i) {
m_cFoodPos.push_back(
CVector2(m_pcRNG->Uniform(m_cForagingArenaSideX),
m_pcRNG->Uniform(m_cForagingArenaSideY)));
i will like to ask if is possible for us to generate a random location for the area where the food was generated in using the random generators functions provided.
Thank you
Cheers,
Max