Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Random Team Chooser
Random Team Chooser
May 3 2009, 3:17 pm
By: newton2ii  

May 5 2009, 9:33 am NudeRaider Post #21

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

OK, didn't have time yesterday to think through all the new developments, but now I have something to say.

Foremost I still think he can use my system as is. No modification needed, even when playing 2v2 or 3v3. (Please correct me if I'm wrong)
Granted, it will sometimes set the "Team" dc of absent players, and it will ally the other players of that team to them, but that doesn't matter, because ally/vision to inactive players does no harm and the team assignment checks for deaths of the "All Players" group which only counts the deaths of active players. Well you can add triggers for uneven player numbers but that's a different story. But imo not even necessary, because if 5 friends want to play they will surely put the 2 best players together vs the rest. They will not want random teams.

Also, I think basing the randomization on minerals instead of switches is a bad idea because then players have a chance to influence the outcome. Good (fast) players will be chosen first, as they accumulate the set amount first or the players could just wait a bit to ensure they have slightly less minerals.

I just glanced your triggers as you haven't added any comments to explain what the respective triggers are supposed to do and that makes grasping someone's idea behind a system infinitely more difficult, especially if they are coded in a scripting language.
However I hope you have accounted for the possibility that some players may reach the mineral barrier(s) at the same time. Even with hyper triggers this is entirely possible.
Also this whole process shouldn't take more than a trigger loop, as it subtracts minerals which may prevent building drones in time (if done too late) or at the very least it masks the real mineral value for a split second as the mineral display is lagging behind.

And last but not least the logic and complexity behind your triggers seems to be much higher. You use more unique triggers that are not looped, more dcs and even the custom score (to avoid using another dc?) which may be a problem for someone who is "nooby at this stuff". ;) (no offense)

Post has been edited 3 time(s), last time on May 5 2009, 9:46 am by NudeRaider.




May 5 2009, 10:14 am Wormer Post #22



Okay, Nude, sorry I have not got time for broad explanations. I was trying to avoid bruteforcing, but seems that I failed. Actually I'm starting to realize my system requires major improvements.



Some.

May 5 2009, 3:13 pm NudeRaider Post #23

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Wormer
Okay, Nude, sorry I have not got time for broad explanations. I was trying to avoid bruteforcing, but seems that I failed. Actually I'm starting to realize my system requires major improvements.
And making it even more complicated? I don't think that's the way to go.
What's so problematic about my solution? As far as I can tell it's relatively easy and will work just fine.

If you want to help newton you could convert my system to your trigger language.




May 5 2009, 10:28 pm Wormer Post #24



Quote from NudeRaider
What's so problematic about my solution? As far as I can tell it's relatively easy and will work just fine.
Well, you provided your solution for the setup of 8 players. I think it is so easy because you're working with predefined number of players. I guess it might be more complicated than one can think if you try to improve the system for support of 2, 4 and 6 players (whatever present in game).



Some.

May 5 2009, 11:14 pm NudeRaider Post #25

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

No, no, I think you haven't read it carefully enough. You need only slight modifications of one trigger set of 8 for 2v2 / 3v3 (in 1v1 there's no alliances to set), but I already explained that briefly:
Quote from NudeRaider
Now make 8 triggers that, depending on the result of "Random1-3" set the dc "Team" to 1 for the respective player according to this table (0 = cleared, 1 = set):
Table

One exemplary trigger: *1)
All Players
C: All Players has suffered exactly 8 deaths of "I'm here"
C: All Players has suffered at most 3 deaths of "Team"
C: switch "Random1" is cleared
C: switch "Random2" is cleared
C: switch "Random3" is cleared
A: Set Player 1's deaths of "Team" to 1

Chances are that P1 had already 1 death of "Team" but that doesn't matter. It will just run again, until four different *2) players have gotten set their dcs to 1.
When this is the case set a switch to move on to the next phase:
[...]
And don't forget that you need to do similar triggers for 3v3 and 2v2 too.
*1) This is the trigger for 4v4. 3v3 would look like this:
C: All Players has suffered exactly 6 deaths of "I'm here"
C: All Players has suffered at most 2 deaths of "Team"
C: switch "Random1" is cleared
C: switch "Random2" is cleared
C: switch "Random3" is cleared
A: Set Player 1's deaths of "Team" to 1

The ingenuity about the system is that it will keep on setting random player's "Team" dc until it finally got 2 3 or 4 active players in one Team (and automatically in the other). It just doesn't care if it sets it for a player that got it already assigned or isn't even there because the "C: All Players has suffered exactly 6 deaths of "I'm here"" condition automatically only adds the deaths of present players. So it will always correctly detect when the teams have been assigned. The same principle is true for the actual visioning/allying. It will ally you to a player that isn't even here, but that doesn't doesn't have any side effects.

*2) (or 2 / 3 active players)

Funfacts


Post has been edited 1 time(s), last time on May 5 2009, 11:44 pm by NudeRaider.




May 6 2009, 2:08 am newton2ii Post #26



Thanks alot to Nude and Wormer for all your efforts. I'll be working on the map slowly over the next few days as I understand each point. I've already figured out how to make obs meaning, when observer lifts cc within first 10 seconds he becomes observer and gets vision from everyone. If you need my triggers for that just ask. It's pretty simple I'm sure you guys could figure it out within a few minutes. (Took me about a week LOL)



None.

May 6 2009, 8:45 am Wormer Post #27



Um... :unsure: I thought it would be more complex... Look, Nude this is your method a bit zipped :) Overall 28 triggers.
Triggers




Some.

May 6 2009, 9:48 am NudeRaider Post #28

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

OK tried to go through your triggers. My comments:
Code
1. trigger: Just use condition always
2. trigger: delete it and add the action to the 1. trigger
3. trigger: will never run as dcProgress never reaches 2
same for rest
I stopped here as obviously there's something wrong there and I'm not continuing reverse engineering something that isn't complete. Maybe you forgot preserves?

It's nice if you try to make a process more efficient, but you're NOT helping anyone by just posting triggers in a scripting language most of us don't know and which aren't even complete/working.
If you want to help post your IDEAS behind the triggers. People should be able to create the triggers on their own, once they understood what you're trying to do.

Also you're not helping yourself if you want macro triggers to become commonly used. If you just spout out syntax nobody will be willing to try and get what that could mean.
You have to convey your logic so they already KNOW what it's supposed to mean and realize "Oh, that's a nice and easy way to do it!".

Sorry if all that sounds a bit offensive, but I hope you're seeing it as constructive criticism.

EDIT:
Looked at it again and it was the preserves that were missing in the first 2 trigs.
I moved on and stumbled upon this: ((n ) % 2 == 1))
No one without knowledge of programming language would understand that. You NEED to explain it if you expect people to understand.
Then here's obviously another mistake: SetDeaths(@P(1), @Set, 1, dcMyTeam)
I suppose 1 must be n+1?

As for the last 2 triggers, I just don't understand them. Obviously dcAllianceStatus controls who gets to ally whom. But how?

P.S.
The reason why I stress so much that people need to understand it is because when someone is supposed to USE it then it's no good when he doesn't even know what he's copying. He'd never be able to make adjustments if necessary, or fix bugs in case you have overlooked a possibility in your triggering.

Post has been edited 1 time(s), last time on May 6 2009, 10:25 am by NudeRaider.




May 6 2009, 7:48 pm Wormer Post #29



Nude, you understood me wrong. :| I'm really very sorry for posting triggers without explanations, but I had not got even five minutes of free time to explain something. I thought like "I just drop them down for people who could understand ideas behind them, and later probably I would have time to explain everything for others".

Quote from NudeRaider
It's nice if you try to make a process more efficient, but you're NOT helping anyone by just posting triggers in a scripting language most of us don't know and which aren't even complete/working.
Actually, I posted triggers for you because I know you're interested in other solutions. By posting triggers I posted the *idea* for people who really interested in this topic, but unfortunately due to some dumb mistakes probably it was hard to understand what I meant. I know I should have given some explanations... but... better something than nothing, right?

Quote from NudeRaider
Also you're not helping yourself if you want macro triggers to become commonly used. If you just spout out syntax nobody will be willing to try and get what that could mean.
I can assure, the aim of my posts was not to spread MacroTriggers in any way. You know I am always trying to post my triggers in semi-verbal language and explain them as well as I could. The reason I posted them in MacroTriggers syntax this time was in that I so much get used to MacroTriggers that writing triggers in MacroTriggers at first was easier for me (familiar syntax, highlighing, an ability to generate fully working SCMD triggers in the future and etc.) than in any other form. And then I simply had not got time to convert them in the other form. You see, for the first post I was able to provide the equivalent triggers in commonly used SCMD syntax specially for those who don't understand MacroTriggers.

Quote from NudeRaider
Sorry if all that sounds a bit offensive, but I hope you're seeing it as constructive criticism.
No problem Nude, though these words hurt because these were not my intentions in any way.

Quote from NudeRaider
Then here's obviously another mistake: SetDeaths(@P(1), @Set, 1, dcMyTeam)
I suppose 1 must be n+1?
Right.

So, my explanations. We have a force fAllPlayers containing all possible players (actually you can use AllPlayers instead of this, I used a force there because of a bug in MacroTriggers which won't allow you to specify AllPlayers as an owner), 5 death counters and 4 switches (yeah, there are actually 3, but you can think of them as 4 different switches at first look).
Definitions


The next two triggers count number of players in each team which stores in dcTeamSize (equal number for all players). We count each second player, that why we need to add one to dcTeamSize only when sOdd is set. Actually we could divide the first trigger on two: one adds to the dc and preserves and the other toggles sOdd once, but I got them zipped in one.
Triggers


After we counted number of players in the team we could start randomizing. We randomize till we place "team size" players into one team. We dont need sOdd from there that is why we can use it for randomization purposes.
Triggers


I look at dcAllianceStatus as a bit-vector where each bit represents the particular player. The next block of triggers sets the bit in dcAllianceStatus which assiciated with the randomized player like in NudeRaider's method. You have to copy this trigger for each number n from 0 to 7. Symbols n1, n2 and n3 correspond to bits of the number n written in binary system. The STate(0) means 'cleared' and STate(1) means 'set'.
Triggers


When we've randomly distributed one half of players to the first team the other half goes to the zero team. Like I said, the idea behind dcAllianceStatus is holding a bit-vector. The meaning of bits: if the bit b (2^b, zero-based) is set for current player then this player should ally the player (8-b). For players in zero team (for which dcMyTeam is 0) we have to invert the bit vector dcAlliedStatus. Trigger T1 sets dcAllianceStatus to "all ones" 11111111 and then in a binary countoff distributed among players in the trigger T2 I assign dcAlliedStatus the value (11111111 - dcTemp) = (((2^8)-1) - dcAllianceStatus) to invert it's bits. The trigger T3 simply sets alliance status according to the bit's value.
Triggers


This is everything I can explain right now. :( I am very sorry for being muddle at some places but I haven't time (again) to clear my text out! I really hope at least Nude could understand now.

Post has been edited 3 time(s), last time on May 6 2009, 8:13 pm by Wormer.



Some.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-5-31. : 2:36 pm]
Wing Zero -- Bop em
[2024-5-31. : 2:36 pm]
Wing Zero -- Mods
[2024-5-29. : 9:40 pm]
Ultraviolet -- :wob:
[2024-5-28. : 8:43 am]
TheHappy115 -- Yea, thats the issue. Thanks. It would also explain why my deleted map couldn't get updated. Updated version reduced collision on units (only thing added) since was dodging game (players collide with each other)
[2024-5-28. : 5:26 am]
Ultraviolet -- If so, I'd just focus on getting them on scmscx.com and then you can link to that in the showcase thread for your maps
[2024-5-28. : 5:25 am]
Ultraviolet -- I can't upload my EUD maps, I think the DLDB has some issue with handling them. Are you trying to upload EUD maps?
[2024-5-28. : 2:06 am]
TheHappy115 -- Its been awhile but ever since I requested one of the Maps I posted to be deleted since I couldn't delete it myself (or update it), I haven't been able to upload any more maps. Any reason for that?
[2024-5-26. : 7:14 pm]
Kyradax -- Hi
[2024-5-26. : 5:05 pm]
O)FaRTy1billion[MM] -- :wob:
[2024-5-25. : 9:22 am]
Zycorax -- :wob:
Please log in to shout.


Members Online: colemanfhoover