- Timestamp:
- 05/21/10 12:10:46 (14 years ago)
- Location:
- vtcross/branches/nikhil/crossmodel2/src
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/branches/nikhil/crossmodel2/src/cognitive_engines/CBR_CE/CBR_CE.cpp
r568 r571 21 21 #include "CBR_CE.h" 22 22 #include <iostream> 23 23 #include <stdlib.h> 24 24 25 25 using namespace std; … … 93 93 /* Adapt the returned parameters to meet the objective */ 94 94 LOG("Cognitive Engine:: Found\n"); 95 95 optList->ToA = 1; 96 96 FineTune(); 97 98 ///// If u include this it will recognise better performance // 99 100 int rnd = (rand() - RAND_MAX/2); 101 if (rnd >= 0) { 102 pList[0].value = returnValues[0] + pList[0].step*(optList->Slope[0])*-1; 103 } 104 else { 105 pList[0].value = returnValues[0]; 106 } 107 108 109 ////// 110 97 111 98 112 } else if(rc == 31337) { … … 227 241 228 242 // MAIN SELF LEARNING CODE HERE // 243 244 if (optList->ToA == 0) { 229 245 230 246 int searchOps[radioInfo->numParameters]; … … 298 314 } 299 315 searchOps[lp] = 0; 300 301 302 } 316 } 317 303 318 304 319 … … 314 329 } 315 330 331 /* 316 332 std::cout << "Ptune " << optList->Ptune << std::endl; 317 333 std::cout << "Status1 " << optList->Status[0][0] << std::endl; … … 321 337 std::cout << "Trend1 " << optList->Trend[0][0] << std::endl; 322 338 std::cout << "Trend2 " << optList->Trend[1][0] << std::endl; 323 339 */ 324 340 /// end of MAIN CODE // 325 341 } 326 342 327 343 } … … 351 367 optList->PoC = 0.01; 352 368 optList->Ptune = 0; // starting with most tunable parameter.. (widest range .. ) 353 369 optList->ToA = 0; 370 354 371 for (int x = 0; x < radioInfo->numParameters; x++) { 355 372 optList->Pweights[x] = 1/(pList[x].step); -
vtcross/branches/nikhil/crossmodel2/src/include/vtcross/cognitive_engine.h
r561 r571 161 161 float PoC; 162 162 int Ptune; 163 163 int ToA; 164 164 165 165 }*optList;