AliYousuf / hedgewars

Automatically exported from code.google.com/p/hedgewars
GNU General Public License v2.0
0 stars 0 forks source link

AddHog uses bot level argument incorrectly #921

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Know that the “Nobody Laugh” mission originally features a botlevel 5 
team
2. Start the Nobody Laugh mission
3. Look on the bot team's flag and observe how the team behaves

What is the expected output? What do you see instead?
I expect the bot team to be of level 5, but instead it is of level 1.
The team has both the flag and behavior of a level 1 team.

What version of the product are you using? On what operating system?
Hedgehwars 0.9.21 on GNU/Linux.

Please provide any additional information below.
The mission “Nobody Laugh” uses the “AddHog” function to add the hog. 
The bot level argument of each “AddHog” call is 5. Yet the team seems to 
actually have bot level 1.

It seems to me that this is a problem of AddHog, and not unique to the mission 
“Nobody Laugh”.

Original issue reported on code.google.com by almikes@aol.com on 4 Apr 2015 at 3:45

GoogleCodeExporter commented 8 years ago
So, this is more a difference between how the engine understands botlevel and 
players.
Engine considers level 0 to be human, and closer to human to get, the stronger 
the bot
So, level 1 is strongest bot, level 5 is weakest.
That's not really how humans consider things though, so visually a level 1 bot 
is shown as 5 bars.

Lua uses engine syntax.  Could add it as such to documentation?

Original comment by kyberneticist@gmail.com on 4 Apr 2015 at 8:13

GoogleCodeExporter commented 8 years ago
But I could *swear* the mission “Nobody Laugh” had a level-5 AI (best) in 
0.9.20.
In 0.9.21 it is only a level-1 AI (worst). This certainly does not look correct 
to me and it is probably not intended. The mission pretty much depends on a 
strong AI. It does not work out well with a weak AI.

Could somebody please check and compare 0.9.20 with 0.9.21?

Also: Could it be that the way AddHog is interpreted has been changed in 0.9.21?
If this is the case, other missions might be affected as well, because they all 
have the AI levels “upside down”.

Original comment by almikes@aol.com on 5 Apr 2015 at 9:58

GoogleCodeExporter commented 8 years ago
It has always worked this way.

Original comment by kyberneticist@gmail.com on 6 Apr 2015 at 1:39

GoogleCodeExporter commented 8 years ago
Data$ for i in {1..5};do echo -n "$i → ";find -name "*.lua" -exec grep 
"AddHog" "{}" \; | grep -E "$i,[[:space:]]*[0-9]*, \"" | wc -l;done
1 → 48
2 → 8
3 → 2
4 → 0
5 → 11

Original comment by kyberneticist@gmail.com on 6 Apr 2015 at 1:44

GoogleCodeExporter commented 8 years ago
Thanks for checking. I have updated the wiki accordingly.

Original comment by almikes@aol.com on 8 Apr 2015 at 4:13