Map Selector

Moderator: keyser

Map Selector

Postby Lieutenant Lich » 29 Aug 2016, 00:44

Hello everyone,
Since map pools are often trash, I made a map selector. It has 34 maps programmed in it. Selection is made randomly (number 0-34), 12 maps are chosen, at least one is a 20x20

Would this be useful in map selection to replace whoever selects them now with a machine?
Attachments
MapSelector.rar
(8.9 KiB) Downloaded 91 times
Last edited by Lieutenant Lich on 20 Nov 2016, 22:54, edited 1 time in total.
Don't complain about that which you aren't willing to change.

My mod:
viewtopic.php?f=67&t=12864
User avatar
Lieutenant Lich
Evaluator
 
Posts: 952
Joined: 01 Feb 2016, 05:28
Location: United States
Has liked: 992 times
Been liked: 818 times

Re: Map Selector

Postby KeyBlue » 29 Aug 2016, 01:36

I'm not going to give an opinion about this being a good idea or not, since i'm not playing enough ladder atm for my voice to matter.
I am going to give some feedback about the selector though.


First impression: it simply picks X random maps and is done with it? (its even possible that it picks less than X)
(34st map will never get picked, i think? Would have to test it, to be sure)
Thats a little too simple I would say.

Things I would consider:
  • Use previous ladder pool to avoid fast repeators (or at least too many repeators )
  • Take # of times a map has been in the ladder pool before into account when picking random maps
  • Make sure there is a good spread of 5x5,10x10,20x20. (can be done easy by making 3lists, 1 for each size and drawing Y amount of maps from them)
  • (Maybe) Change the map mix each rotation ( for example 2/3/4 5x5 + 4/5/6 10x10 + 2/3/4 20x20 )
  • (Maybe) Make sure to have some navy maps
  • (Maybe) Make sure to have some high resource/reclaim and some low resource/reclaim maps
  • (Maybe) Use players preferences when choosing random maps (ex: give Theta a bigger chance if a lot of people like it?)

Thats it for now, maybe I'll thing of some more later.
User avatar
KeyBlue
Priest
 
Posts: 403
Joined: 28 Jan 2016, 01:06
Has liked: 140 times
Been liked: 93 times
FAF User Name: KeyBlue

Re: Map Selector

Postby biass » 29 Aug 2016, 04:55

LichKing2033 wrote:Vanilla Aeon Campaign 1 Map, 10x10, eligible for ladder.

white fire.
Map thread: https://bit.ly/2PBsa5H

Petricpwnz wrote:biass on his campaign to cleanse and remake every single map of FAF because he is an untolerating reincarnation of mapping hitler
User avatar
biass
Contributor
 
Posts: 2239
Joined: 03 Dec 2015, 07:54
Has liked: 598 times
Been liked: 662 times
FAF User Name: biass

Re: Map Selector

Postby Lieutenant Lich » 29 Aug 2016, 16:30

yes. It is a decent map, I played a 1v1 there with my trainer.
Don't complain about that which you aren't willing to change.

My mod:
viewtopic.php?f=67&t=12864
User avatar
Lieutenant Lich
Evaluator
 
Posts: 952
Joined: 01 Feb 2016, 05:28
Location: United States
Has liked: 992 times
Been liked: 818 times

Re: Map Selector

Postby codepants » 31 Aug 2016, 04:50

Use recursion to keep from picking duplicate maps, not... whatever you're doing now. And instead of setting properties for whether a map has been chosen put it in an array, then you can just dump the array when you don't need it anymore. The map doesn't need to know if it's been picked or not. If you want to keep track of what's been picked then after picking it set pickcount++ or something.

Pseudocode:
pickmaps(countdesired){
if(countdesired<maps.size()){
throw new IllegalStateException("You must ask for at least as many maps as desired");
}
while(maps.size() <= countdesired){
maps.add(picknext());
}
}

picknext(){
map next = randomNumber();
if(!maps.contains(next)){
return next;
]else{
return picknext();
}
}

I imagine there's also a clever way to keep from using recursion like asking for a number between 0 and countdesired-maps.size(), then using indexes to select the remaining maps instead of their ID.
codepants
Priest
 
Posts: 310
Joined: 07 Aug 2014, 17:44
Has liked: 14 times
Been liked: 54 times
FAF User Name: codepants

Re: Map Selector

Postby Lieutenant Lich » 31 Aug 2016, 14:40

Inside each map there are several variables:
String name;
int side;
int playerCount;
boolean isForLadder (or something like that);
boolean selected;

When a map is selected, I call Map.Select(true); and it sets the value of 'selected' to whatever is inside the parenthesis. That was done to prevent the same map taking 2 spots in the rotation. e.g.
1) crimson feud
2) open palms
3) loki
4) crimson feud
5) ..., etc.

Now maps do not repeat in the selection.

KeyBlue:
This was intended to choose maps ON WHICH ladder matches will be played. It does not choose on which map do 2 players get matched up on.
Don't complain about that which you aren't willing to change.

My mod:
viewtopic.php?f=67&t=12864
User avatar
Lieutenant Lich
Evaluator
 
Posts: 952
Joined: 01 Feb 2016, 05:28
Location: United States
Has liked: 992 times
Been liked: 818 times

Re: Map Selector

Postby KeyBlue » 31 Aug 2016, 15:01

LichKing2033 wrote:
KeyBlue:
This was intended to choose maps ON WHICH ladder matches will be played. It does not choose on which map do 2 players get matched up on.


Yes i know.
Most of my considerations apply to both. Which is normal since your selector can be seen as an intermediate step for picking a map for 2 players to play on.

and

codepants means that the property 'selected' is a bad design choice. It has nothing to do with the Map object.
(easy way to think about it is: if somebody sees this property will they know what it is? Yes, good design. No, not so good design.
There are exceptions ofcourse, its just a simple rule you can apply in small projects)
User avatar
KeyBlue
Priest
 
Posts: 403
Joined: 28 Jan 2016, 01:06
Has liked: 140 times
Been liked: 93 times
FAF User Name: KeyBlue

Re: Map Selector

Postby Lieutenant Lich » 20 Nov 2016, 16:58

After some on and off work on this, I'm done! The Map Selector works!
DESCRIPTION
- It is only to be used to select the map pool for the next month/2 weeks.
- There are 33 maps, all of which are fit for ladder.
- The algorithm prevents the same map from being in the pool twice.
FUNCTIONS:
- Random Map (chooses a random map from the 33 maps that are in the program's memory)
- Fight (chooses a map from the pool, if one exists)
- Set Map Pool (selects 12 maps, at least 1 of which is a 20x20. Maps are written to a file)
- Display All Maps (lists all 33 maps)
- Display Ladder Pool (lists all 12 maps)

MapSelector.jar is attached. Run it and see for yourself.

EDIT (11/30/16) - there are 34 maps in total to choose from.
Attachments
MapSelector.rar
.jar file is inside
(8.9 KiB) Downloaded 106 times
Don't complain about that which you aren't willing to change.

My mod:
viewtopic.php?f=67&t=12864
User avatar
Lieutenant Lich
Evaluator
 
Posts: 952
Joined: 01 Feb 2016, 05:28
Location: United States
Has liked: 992 times
Been liked: 818 times

Re: Map Selector

Postby biass » 07 Dec 2016, 23:30

hi
I download the RAR file, it has a "Mapselector.jar" file, i click on it and it gives me an exception
i assume this is not supposed to happen :P
Map thread: https://bit.ly/2PBsa5H

Petricpwnz wrote:biass on his campaign to cleanse and remake every single map of FAF because he is an untolerating reincarnation of mapping hitler
User avatar
biass
Contributor
 
Posts: 2239
Joined: 03 Dec 2015, 07:54
Has liked: 598 times
Been liked: 662 times
FAF User Name: biass

Re: Map Selector

Postby Lieutenant Lich » 08 Dec 2016, 05:08

Do you have Java installed? If you have java but the problem persists, try extracting the .jar file from the archive somewhere and then running it.

PM me the error message by the way.
Don't complain about that which you aren't willing to change.

My mod:
viewtopic.php?f=67&t=12864
User avatar
Lieutenant Lich
Evaluator
 
Posts: 952
Joined: 01 Feb 2016, 05:28
Location: United States
Has liked: 992 times
Been liked: 818 times


Return to FAF Suggestions

Who is online

Users browsing this forum: Google [Bot] and 1 guest