Spin bug

  • Автор темы Автор темы lokiys
  • Дата начала Дата начала

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 922
Реакции
1 206
Баллы
113
If zenno have inteli spintax as well then this need to write in features.
Why i'm telling that is because i have problem with spintax - I have 6 links in my file.
And from 60 posts what i made i have:
24 - posts with keyword 1
18 - posts with keyword 2
18 - posts with keyword 3

Not a single post with keyword 4 - keyword 5 and keyword 6 :O
I thought that spintax working like random. But as i see i was wrong...

Actually i noticed some problems with anything random things in zennoposter. You should change your random algorithm because it is not really random.

Cheers
 
It looks fine from math background. You can get more even random using this code.
It generates a number from 0 to 5.
JavaScript:
Развернуть Свернуть Копировать
Random rnd = new Random();
int r = rnd.Next(10000000);
int w = r % 6;
return w;
 
It looks fine from math background. You can get more even random using this code.
It generates a number from 0 to 5.
JavaScript:
Развернуть Свернуть Копировать
Random rnd = new Random();
int r = rnd.Next(10000000);
int w = r % 6;
return w;
It's nice way. I have made project for this test this generation.
JavaScript:
Развернуть Свернуть Копировать
Random rnd = new Random();


var d = new Dictionary<int, int>();


for (int i = 0; i < 100000; i++)
{
    int r = rnd.Next(10000000);
    int w = r % 6;
    if (!d.ContainsKey(w)) d.Add(w, 1);
    else d[w]++;
}


var sb = new StringBuilder();


foreach (KeyValuePair<int, int> pair in d)
{
    sb.AppendLine(String.Format("{0}: {1}", pair.Key, pair.Value));
}


return sb.ToString();
This code generates 100000 times number from range 0-5, collects statistics and write it to returned variable.
I have got the follow:
0: 16728
1: 16721
2: 16603
3: 16567
4: 16677
5: 16704
I think it's not bad.
 

Вложения

  • test.xmlz
    test.xmlz
    14,3 KB · Просмотры: 305
  • Оценить
Реакции: Hungry Bulldozer

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)