View unanswered posts | View active topics It is currently Tue Dec 10, 2019 8:26 am



Reply to topic  [ 66 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next
Genetic Algorithm/Neural Network integration 
Author Message
User avatar

Joined: Tue Dec 22, 2015 9:44 pm
Posts: 668
Reply with quote
I don't remember anymore, but I'm pretty sure running 'bracket "ship1.lua" "ship2.lua" ' will work... However I think it'll only work on single ships. And if that doesn't work, you can probably try putting your ship files with the other default ship files (for example the folder that contains lua files for engineer, archer, interceptor, etc) then run bracket shipname1 shipname2

_________________
Graphics Overhaul Mod ver 2.0

Murderballs Faction Mod ver 1.2

Join us at our Reassembly Discord!


Fri May 13, 2016 1:33 pm
Profile

Joined: Wed Aug 19, 2015 7:00 pm
Posts: 73
Reply with quote
I figured it out. I have extra work to do but it is workable. The arena command only uses fleet files with a "lua.gz" extension. The files are compressed, so I will need to find a library for gzipping the created ships into a fleet and calling it from there. I have decided to jump over to windows to make a working copy for the majority of people. I will need to alter my code to work on windows just a bit. But I expect some sort of working copy going next week some time. Damn was it hard to get the command line calls right and find out where the heck ships needed to be located and in what form. Haha. I am just so glad I can eventually get this thing rolling.


Fri May 13, 2016 1:41 pm
Profile

Joined: Thu Jan 14, 2016 2:21 pm
Posts: 94
Reply with quote
Good to see you're making progress. Unfortunately I know nothing about getting the command line thing working.

However! As of the current beta branch the game can read out the block shapes as a shapes.lua file when the block writing cvar is set (and read new entries in mods to define custom shapes). I suppose that's not too helpful right now though, given that you've already re-written them yourself, as I did for RWDK.

_________________
My mods
Starring:
  • The Triumvirate - Triangles with shotguns and ablative armour
  • InfraSpatia - Disjointed aliens with spinal guns
  • Systems Coalition Remnant - Turbo-rectangles with stacking guns
  • Roiders - Cities and drills
Make your own with the Reassembly Web Development Kit!


Fri May 13, 2016 8:46 pm
Profile

Joined: Wed Aug 19, 2015 7:00 pm
Posts: 73
Reply with quote
Update: I finally got the system calls working from windows. I currently have two branches of the program going on my git-hub.
https://github.com/BattleFelon/Reassembler

The master branch is a library free version of program that executes an endless tournament with random ships until you end the program. It keeps the winning ship from each generation and puts it into the next one. Really primitive way of creating ships, but I am working on improving it with a cross breeding function.

The performance of the program can create ten 900 P ships in under a second. Each arena match takes approximately one second in the fastest configuration. The program takes inputs from config.txt like target P value, max block count, and the needed path varibles so it will work. It compiled with MinGW on my 64 bit system. If you just want an executable file let me know. I am trying to make this for everyone. :D

The other branch has a GUI that I am using for block shape debugging, and to ensure the collision checking works as expected. It depends on the most recent SFML and SFGUI. Build it with cmake.

Improvements Made: I added thruster support for the ship building logic. I am working on a symmetric ship building logic. I know how much people like symmetry. I have added a single weapon for now, but my next task it to define more blocks.

Future Plans: Next task is to work on the actual genetic part of this program. My current thoughts are to have the program randomly select "Chunks" of blocks from the top performers of a population. The chunks can then be added to a new ship in the next generation. I can build logic that keeps good chunks. A chunk would sort of be like an appendage for a person. It is a group of things that do a task real well. So maybe a group of blocks will have similar properties. IDK, just theory right now. Will be a little challenging to program, but the framework is done.

I also want to have a fleet evolving option in the future. The current file writer actually makes fleet files because the "arena" command can't take single ship args. This means I can eventually build a program that grows and battles fleets. that would be hella cool.

I for sure want to include options for taking player created ships as an input. The program could use it as a base design and mutate off of the design to try and improve it. I could also eventually create an option for "Beat my Ship/Fleet" where my program keeps trying designs of equivalent value Ship/Fleets until it beats you. I think that would be awesome to try and implement, and it would really push people's creativity. And of course I could put my program against the winners of tournaments.

I want everyone's input on this, and for this to be built for accessibility and fun.

Attachment:
with_thrusters.png
with_thrusters.png [ 19.37 KiB | Viewed 2980 times ]


Tue May 17, 2016 10:41 am
Profile
User avatar

Joined: Mon Aug 17, 2015 4:44 pm
Posts: 669
Reply with quote
Beat My Ship / Beat My Fleet sound awesome. I'm assuming it then saves the winning fleet so you can see how it came up with that solution? And set it up to run a best three out of five so it wasn't just a fluke that it won?

_________________
NMSS Reassembly Tournament Archive

We have a Discord, too


Tue May 17, 2016 1:36 pm
Profile

Joined: Wed Aug 19, 2015 7:00 pm
Posts: 73
Reply with quote
I could set it up however you guys want. I haven't actually participated in a tournament yet, so I am not terribly clear on what sort of ship classes there are. If there were a standard fleet configuration, P values, number of ships, ect. I could design the program to do that. My approach right now is to just keep it flexible enough to do whatever people need it to do. As of right now I am trying to finish block definitions of the Terran faction. Once I get that done I am gonna try and work on making a single ship breeding, then onto fleets.


Tue May 17, 2016 2:24 pm
Profile
User avatar

Joined: Fri Jan 24, 2014 10:11 pm
Posts: 1295
Location: Ames, IA
Reply with quote
Definitely want an EXE of that...I don't know the first thing about properly extracting a file from github.

One thing I think you could so would be have any part added to the generator's list automatically populate its own parameters in the shape data area, along with.. oh what the hell I don't know just let me play with it or something. ATM I have no idea how to get it to run from github though...

_________________
The game where I originated as a member of this community. . VISUAL BASED MOD KIT!!
Shellcore command EP2


Tue May 17, 2016 8:56 pm
Profile
User avatar

Joined: Mon Aug 17, 2015 4:44 pm
Posts: 669
Reply with quote
BattleFelon wrote:
I could set it up however you guys want. I haven't actually participated in a tournament yet, so I am not terribly clear on what sort of ship classes there are. If there were a standard fleet configuration, P values, number of ships, ect. I could design the program to do that. My approach right now is to just keep it flexible enough to do whatever people need it to do. As of right now I am trying to finish block definitions of the Terran faction. Once I get that done I am gonna try and work on making a single ship breeding, then onto fleets.


Most tournaments run in different formats. One of the things I was thinking about doing is finding some way to feed it rules (various constraints, fleet limitations, and ship counts). For a first version, I suppose the easiest idea would be to try and have it build ships for the monthly tournaments I've been running. Some generic ruleset for testing might be the standard block of my rules:

All ships from a single faction
All parts obtainable in unmodified campaign mode
16,000 P, 8 ship cap

I'd also set some minimum allowable thrust in each of the cardinal directions to ensure it doesn't just build huge blocks of armor that can't move. Those are fairly effective in the current scoring system, but terribly unfun to watch.

I'd really like to have it grow a fleet during the month leading up to one of the NMSS tournaments and have it battle against some user submissions.

_________________
NMSS Reassembly Tournament Archive

We have a Discord, too


Wed May 18, 2016 4:45 am
Profile

Joined: Wed Aug 19, 2015 7:00 pm
Posts: 73
Reply with quote
Hell yeah, that gives me a goal time line. The tournament is at the beginning of the month right? I could totally give it rules like that, no problem. Right now my config file is focused on single ship creation. I have yet to work on a fleet generation algorithm yet, but it is for sure able to be done. I can also set a min number of thrusters. I currently have options for max number of blocks, as well as P value. I'll keep you posted

I'll work on the EXE today. I'll post links to download the various versions that should work out of the box, with proper configuration. Just an FYI for when I do post, the block_data.csv file contains the weights for choosing blocks randomly. For instance, if you didn't want any mini thrusters you change the weight to zero. If you want a ton, change the weight to 100. If the weights are all the same, the blocks will all be selected with similar frequency. Of course, the nature of random means it could also make a ship from just one block type.

also in the data folder is the config.txt document that will need editing before it will run on you computer. The path to your Reassembly executable will need to be put in there, and well as the path to your reassembly data folder containing your log files. And the path to the ships folder contained in my program. The config.txt file also contains a lot of other options that should be well explained in the comments.

The program will currently run forever. I am not sure I will get to cross breeding today, so just know that you gotta end it when you want to. I am also working on the program loading other designs. So you could have it keep running till it wins. Still working on symmetric building, more block defs, ect. Got a lot to do, but what I have right now is pretty neat. Ill post it tonight.


Wed May 18, 2016 4:59 am
Profile

Joined: Wed Aug 19, 2015 7:00 pm
Posts: 73
Reply with quote
Good News Everyone.

Finally got symmetric ship building done, I fixed my broken collision detection. It will still have bugs, but it is much better and faster. I now have an option for target thruster point values. This does not guarantee it will have it, some designs suck really badly and run out of attachment points or can't do it. This does allocate a certain amount for for the thrusters and it tries real hard to make it work. The program is designed to never got over the target values, so some ships will be under by quite a bit. It just deletes the last one the made it go over.

Also, i had to sort of change my building logic to do thruster control. It will now not add thruters until the end. I can change this if desired.

Trying to get the EXE going. Will aim for tonight. I just wanted to fix the collision and symmetry. Parts list was extended, but still a little limited. Once I get all the shapes it will be trivial to get all the modules. I did a stress test and produced a 439000 P ship. Symmetry eye candy is also below

Attachment:
stress.png
stress.png [ 109.55 KiB | Viewed 2958 times ]


Attachment:
symm.png
symm.png [ 37.54 KiB | Viewed 2958 times ]


Wed May 18, 2016 10:46 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 66 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software