Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Jo
Jan 24, 2005

:allears:
Soiled Meat
Might not look like much, but I trained an RBM I wrote to automatically generate Pokemon:



I also wrote a convolutional layer, but I'm not done debugging it. When that's finished the output should be cleaner. Surprisingly, a mean filter didn't do much to improve quality.

Adbot
ADBOT LOVES YOU

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Jo posted:

Surprisingly, a mean filter didn't do much to improve quality.

Maybe you should try a nice filter instead.

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

Avenging Dentist posted:

Maybe you should try a nice filter instead.

Or, more helpfully, a median filter.

Jo
Jan 24, 2005

:allears:
Soiled Meat

Hubis posted:

Or, more helpfully, a median filter.

Much obliged. I'll give this a try. I'm still trying to grok the difference in their behavior.

Jerry Bindle
May 16, 2003

Jo posted:

Might not look like much, but I trained an RBM I wrote to automatically generate Pokemon:



I also wrote a convolutional layer, but I'm not done debugging it. When that's finished the output should be cleaner. Surprisingly, a mean filter didn't do much to improve quality.

the thing on the left is nightmarish. pass it through a hell filter to enhance the blood coming out of its mouth's eyes. good work!!!

Jerry Bindle
May 16, 2003

Jo posted:

Much obliged. I'll give this a try. I'm still trying to grok the difference in their behavior.

this book is a really good into to implementing filters, and apparently free now!

http://www.dspguide.com

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

Jo posted:

Much obliged. I'll give this a try. I'm still trying to grok the difference in their behavior.

The median is the 'middle value' of the set (i.e. the one in the middle when all values are sorted based on some criteria) wheras the (arithmatic) mean is the average of the set.

Since the median value will match one of the adjacent pixels, there will be no interpolation/blurring, so you'll preserve sharp edges in the data set. This is good if you're upsampling something from a limited palette and want the output to stay in that palette, for example. Of course you can only really do this if you have a reasonable way to sort the set to find the median in the first place (and that can be the tricky part for a median filter) but in your case it would be an easy implementation since the image is already black-and-white.

Volte
Oct 4, 2004

woosh woosh
I am writing my master's thesis in LaTeX and I need to typeset both Haskell and Scala code inline in the document, literate style. Normally Haskell is handled by lhs2tex, but it's extremely old and kind of lovely, and is a bitch to integrate into your main document if you only need a few pages typeset. So I spent two days porting the useful functionality of lhs2tex (which is only a very small part of it, turns out) to Python and integrating it with pygments to make it handle any language rather than just Haskell. It also simply processes text so you can process two paragraphs out of your whole document, rather than producing a full separate TeX document. The desirability of non-monospaced typesetting of code may be controversial but I thought it was an interesting pursuit anyway and I'm pretty happy with the result.



The important feature is the column-based alignment from lhs2tex. It's not as fine-tuned as lhs2tex but I'm just going to tweak it ad-hoc to fit my needs as I write my thesis.
The Scala part mostly works but I haven't written a token spacing algorithm for it yet so everything is all mushed togther (other than the column-based alignment).


I dunno why that object keyword is not highlighted, pygments knows about it---I checked.

Volte fucked around with this message at 13:37 on Aug 24, 2015

Volte
Oct 4, 2004

woosh woosh
Well that's satisfying.


Still have to tweak some of the symbol replacements and spacing and stuff, but now I can get back to writing. :coal:

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe
I'm back.

pepito sanchez
Apr 3, 2004
I'm not mexican

that is some akira poo poo right there. please tell me this wasn't intended.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
I must go. My tea-ple need me.

movax
Aug 30, 2008

Jo posted:

Might not look like much, but I trained an RBM I wrote to automatically generate Pokemon:



I also wrote a convolutional layer, but I'm not done debugging it. When that's finished the output should be cleaner. Surprisingly, a mean filter didn't do much to improve quality.

If it doesn't work, just remember, Missingno was a legit Pokemon.

Ekster
Jul 18, 2013


That is some unsettling metaphysical poo poo right there.

Jo
Jan 24, 2005

:allears:
Soiled Meat

movax posted:

If it doesn't work, just remember, Missingno was a legit Pokemon.

Actually, I should check and make sure the data set doesn't have Missingno in it. That might be causing problems.

mobby_6kl
Aug 9, 2009

by Fluffdaddy

Internet Janitor posted:

A while back I posted about a K interpreter I've been writing. Last night I started tinkering with a project I call iKe:



It's a browser-based IDE for writing games and interactive graphical sketches using K. It's very fun to see how much can be written in a few lines of actual code and some arrays of static data. If there's interest I can show some additional screenshots as I develop more involved examples with the system.

This is cool! Yeah the language is ridiculously expressive. I've been trying to learn K and KDB for a while now. There's some documentation of course but I found most to be quite dense and difficult to follow. Are there any learning resources you could recommend?

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
mobby_6kl: It is a bit difficult to find good resources. I learned most of what I know about the language by poring over the K2 Reference Manual as I wrote my K interpreter. The Wiki for Kona, the other open-source K interpreter, has links to a ton of articles and other material. No Stinking Loops is another great place to find interesting K programs, although some are presented without much discussion and thus rather cryptic.

For my own part, I have written a brief but reasonably comprehensive manual for oK which describes the verb and adverb behaviors I have reverse-engineered by studying k5. I also wrote a bit about K programming techniques.

iKe is coming along nicely since my last posts. A guy who works for Dyalog wrote an asteroids game, and I have been tinkering with an implementation of breakout:



In the Pixel Art thread I wrote a quick one-off image processing program to experiment with animation effects:



And I also whipped up one way to implement conway's game of Life:

LP0 ON FIRE
Jan 25, 2006

beep boop
Rendering Sierpinski's Triangle using the Chaos Game method. I find the initial random point inside the triangle's three points by getting Barycentric coordinates.





using Javascript lol

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

LP0 ON FIRE posted:

Rendering Sierpinski's Triangle using the Chaos Game method. I find the initial random point inside the triangle's three points by getting Barycentric coordinates.

:hfive: Chaos Game bro. Here's my Chaos Game shits: http://forums.somethingawful.com/showthread.php?threadid=3676849#post441073931

e: Hopefully I'll have some new Chaos Game progress in September, since I'm about finished with some of my (non-screenshot-worthy) projects.

Avenging Dentist fucked around with this message at 19:16 on Aug 27, 2015

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
That's really neat! I had a go at writing one in K:

http://johnearnest.github.io/ok/ike/ike.html?gist=8c2ec75f1fe34c4cd898

FIrst I define a function which calculates random iterative successors:
code:
i:{*1?(0 0;.5 .5;1 0)+\:x%2}
Then on each frame I add a new point by taking the floor of 80* 20 iterations of applying i, starting from (1,1):
code:
_80*20i/1 1

Internet Janitor fucked around with this message at 19:23 on Aug 27, 2015

LP0 ON FIRE
Jan 25, 2006

beep boop

Avenging Dentist posted:

:hfive: Chaos Game bro. Here's my Chaos Game shits: http://forums.somethingawful.com/showthread.php?threadid=3676849#post441073931

e: Hopefully I'll have some new Chaos Game progress in September, since I'm about finished with some of my (non-screenshot-worthy) projects.

Those are actually amazing looking! Are those Lorenz Attractors too? And holy crap, the post above that. (Though totally different kind of fractal.)


Internet Janitor posted:

That's really neat! I had a go at writing one in K:

Really nice. What kind of results do you get if you use round instead of floor values?

e: Never mind I guess I can just edit that code, and it's sort of blowing my mind how little code there is.

LP0 ON FIRE fucked around with this message at 19:53 on Aug 27, 2015

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
I imagine it would look pretty much the same- I only floor at the end of my calculations. iKe is designed for working with relatively low resolution bitmaps. 160x160 pixels is all it can draw at for the time being.

edit: iKe's manual and more example code is here if anyone wants to tinker.

Internet Janitor fucked around with this message at 20:00 on Aug 27, 2015

LP0 ON FIRE
Jan 25, 2006

beep boop

Internet Janitor posted:

I imagine it would look pretty much the same- I only floor at the end of my calculations. iKe is designed for working with relatively low resolution bitmaps. 160x160 pixels is all it can draw at for the time being.

edit: iKe's manual and more example code is here if anyone wants to tinker.

Pretty interesting! I often turn to Javascript to tinker or prototype, but this sounds like a good thing to use as well. By the way, I tried round if I did it correctly: _ 0.5 + whatever



I made a nicer looking one than what I had before using low alpha pixels and rendered it during my lunch break:



Now I want to make a huge one overnight and print it 300dpi. My life is exciting.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

LP0 ON FIRE posted:

Those are actually amazing looking! Are those Lorenz Attractors too? And holy crap, the post above that. (Though totally different kind of fractal.)

Not specifically Lorenz, but obviously they are attractors. I'm using this paper as a basis for my project.

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost


Wrote a Twitter Bot for parsing the Leper's Colony. It scans it every 5 minutes or so, runs a query using another library I wrote to see if there are new entries and, if so, posts them to Twitter.

I'm trying to think of how to get the reason and actual post in there too. I can't fit the reason into a tweet, unless I post it elsewhere. So I was thinking of just making a screenshot of the post and adding the reason on top of it. Not sure if I can render HTML in a console Web Job, but it's probably worth a shot.

Kumquat
Oct 8, 2010

Drastic Actions posted:



Wrote a Twitter Bot for parsing the Leper's Colony. It scans it every 5 minutes or so, runs a query using another library I wrote to see if there are new entries and, if so, posts them to Twitter.

I'm trying to think of how to get the reason and actual post in there too. I can't fit the reason into a tweet, unless I post it elsewhere. So I was thinking of just making a screenshot of the post and adding the reason on top of it. Not sure if I can render HTML in a console Web Job, but it's probably worth a shot.

Have you looked at phantomjs? Basically a headless, scriptable browser that you can also use to capture screenshots, among other things. (http://phantomjs.org/screen-capture.html)

Edit: Looks like there's a C# wrapper as well: http://www.nrecosite.com/phantomjs_wrapper_net.aspx

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost

Kumquat posted:

Have you looked at phantomjs? Basically a headless, scriptable browser that you can also use to capture screenshots, among other things. (http://phantomjs.org/screen-capture.html)

Edit: Looks like there's a C# wrapper as well: http://www.nrecosite.com/phantomjs_wrapper_net.aspx

Their ImageGenerator library works... kinda. The forums have pretty hosed up markup, so their generator only gets some of the css properly, so it won't get the full post. I made a makeshift post generator of my own (a weaker version of what I have on my forums app) and it worked better.



However the bigger problem is that it won't work on Azure. The image never finishes processing :(. In their FAQ it says it should work, so I'll have to ask them. But thanks for sending me in the right direction :)

lord funk
Feb 16, 2004

gently caress you, boxes! Ha!

Polio Vax Scene
Apr 5, 2009



Crosspost from Making Games thread.

So I hate how paint.net has like no sprite or animation support in it.

So I hated it so much, that I made a thing. It loads .pdn files, and lets you turn on/off layers and specify animation stuff. It also watches the file you open, so you can make a quick tweak in paint.net, and it will automatically reload it and start animating the new changes.

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

lord funk posted:

gently caress you, boxes! Ha!



This is cool. How many objects, and how fast is it running?

A while back, I was fiddling with image manipulation. These are old, and I've developed better filters, but these are the screenshots I have handy.






Most of these are just two-dimensional plus/minus matrices applied to the image. I don't know what I'm doing, but it's fun.

Edit:

Orzo posted:

A bunch of random recent screenshots from my game:



Accidentally placed a fog texture on a distortion layer:


Dude, whatever happened to this? It was looking so kickass.

Centripetal Horse fucked around with this message at 01:22 on Sep 2, 2015

LP0 ON FIRE
Jan 25, 2006

beep boop

Centripetal Horse posted:


Dude, whatever happened to this? It was looking so kickass.

Yeah, I really wish there would be some updates on this too. :(

This is all hearsay, but apparently he had a kid, and it took over his spare time.

lord funk
Feb 16, 2004

Centripetal Horse posted:

This is cool. How many objects, and how fast is it running?

So far up to 6000 boxes at 60fps. Pretty basic lighting (ambient + diffused + specular), and the biggest bottleneck I'm getting is poor array performance in Swift for the box models.

Tres Burritos
Sep 3, 2009

lord funk posted:

So far up to 6000 boxes at 60fps. Pretty basic lighting (ambient + diffused + specular), and the biggest bottleneck I'm getting is poor array performance in Swift for the box models.

Are you using metal?

lord funk
Feb 16, 2004

Tres Burritos posted:

Are you using metal?

Yeah. So far really liking it, and the debugging tools are pretty excellent.

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

LP0 ON FIRE posted:

Yeah, I really wish there would be some updates on this too. :(

This is all hearsay, but apparently he had a kid, and it took over his spare time.

His gain is our loss, I guess. That project looked great. I hope it hasn't just died on the vine.


lord funk posted:

So far up to 6000 boxes at 60fps. Pretty basic lighting (ambient + diffused + specular), and the biggest bottleneck I'm getting is poor array performance in Swift for the box models.

Is that running on a mobile device? Which part of the array performance is slowing you down? Are you adding and removing a lot of objects at arbitrary locations?

lord funk
Feb 16, 2004

Centripetal Horse posted:

Is that running on a mobile device? Which part of the array performance is slowing you down? Are you adding and removing a lot of objects at arbitrary locations?

Yeah, iPad. I'm seeing excessive retain / release of my models while I iterate through them to update the physics. If I were using Obj-C, I'd turn off ARC to solve this. But I'm not sure what to do in Swift land.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

LP0 ON FIRE posted:

This is all hearsay, but apparently he had a kid, and it took over his spare time.
Kids will be the death of gamedev. :v:

Programmer Humor
Nov 27, 2008

Lipstick Apathy
After reading The C++ Programming Language 4th edition and watching a bunch of 8 out of 10 Cats does Countdown, I decided to code a couple of cheat programs to check out the new C++11 features.

The words part was pretty easy. Take a dictionary, copy_if every word that can be formed with the given letters (using a map<char,int> to keep track), and sort by length.

code:
$ ./words sterdoaem
...
smarted
sedater
dearest
roseate
torsade
roasted
redates
tsardom
oersted
oedemas
demotes
emerods
emoters
meteors
maestro
8
mastered
moderate
modester
seadrome
streamed
9
moderates
The numbers part was a bit more tricky. I ended up checking every possible combination of operations using a recursive function, taking all possible ways to split up the remaining numbers, getting all the possible sub-expressions using those numbers, and combining them using every operator. Using reverse Polish notation made it easy to express the expression in a simple vector<int>, with a few special values representing arithmetic operators.

The huge list of possibilities was then sorted by accuracy, numbers used and operations used to create the most accurate result, using as few numbers, and as simple operators as possible. A simple print function evaluates the best result again, converting the RPN to a more familiar form.

code:
$ ./numbers 4 10 8 3 25 100 336
...
8 4 10 + * 3 * = 336
8 10 4 + * 3 * = 336
4 8 + 100 + 3 * = 336
3 8 4 10 + * * = 336
8 4 100 + + 3 * = 336
3 8 10 4 + * * = 336
3 10 4 + 8 * * = 336
3 8 4 100 + + * = 336
3 100 8 4 + + * = 336
8 4 + 25 3 + * = 336
8 3 10 4 + * * = 336
8 3 4 10 + * * = 336
8 4 100 + + 3 * = 336
8 100 + 4 + 3 * = 336
8 10 4 + 3 * * = 336
100 8 4 + + 3 * = 336
8 4 10 + 3 * * = 336
4 10 + 8 * 3 * = 336
Best one:
4 + 10 = 14
14 * 8 = 112
112 * 3 = 336
checked 3263127 possible solutions

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Programmer Humor posted:

After reading The C++ Programming Language 4th edition and watching a bunch of 8 out of 10 Cats does Countdown, I decided to code a couple of cheat programs to check out the new C++11 features.

:confused: What?

Oh its a tv game show. I get it now.

That actually sounds like something that would be a question in a google code jam.

Adbot
ADBOT LOVES YOU

TheresaJayne
Jul 1, 2011

Zaphod42 posted:

:confused: What?

Oh its a tv game show. I get it now.

That actually sounds like something that would be a question in a google code jam.

8 out of 10 cats is a comedy show, the actual show is called Countdown.
[link]https://www.youtube.com/watch?v=_JQYYz92-Uk[/link]

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply