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
Inquisitus
Aug 4, 2006

I have a large barge with a radio antenna on it.
ScreenCap:



Just a screenshot program I guess. Allows for plugin capture sources and output destinations. I even took that screenshot with it :c00lbert:

Adbot
ADBOT LOVES YOU

Inquisitus
Aug 4, 2006

I have a large barge with a radio antenna on it.
The colours :barf:

Inquisitus
Aug 4, 2006

I have a large barge with a radio antenna on it.

Azazel posted:

Ran across why the lucky stiff's github code repo, and found his Shoes graphic API project. Decided to wrap my current Go related project with it. Very slick and easy to use.



Looks interesting. You've inspired me to start my own Go project; I've been working on it all day :)

Out of interest, is this a client or a standalone program you're creating?

Also, how do you track groups across turns? If two groups get merged, do you just arbitrarily dispose of one and expand the other?

Inquisitus
Aug 4, 2006

I have a large barge with a radio antenna on it.

Azazel posted:

This is one of several stand alone Go relaed projects, although I haven't worked on it since posting that screenshot. I just released the Ruby SGF parser as an open source project this week, but I haven't tested all cases yet (and stuff like node branching doesn't work at all). Check http://kantan-sgf.rubyforge.org/ if you are interested.

As for group tracking: It was more complicated than I originally thought, but my algorithm seems to work well. I used the Shoes interface to visually verify that it was working as I thought, since console and/or text output was a pain to debug in this case. I read a little about how GnuGo handles groups in the past, then created my own version based on how I thought it'd work out.

I have a high level GroupTracker object, and a lower level StoneString object. The Board object receives moves from the players and does a pre-check with the GroupTracker to see if the move is a suicide (assuming "no suicide" is flagged). It then checks if the move is adjacent to a verticle/horizontal stone/group of the same color, which are tracked by StoneStrings.

If nothing is adjacent, it registers a new StoneString at that point along with it's open liberties. If something is adjacent, it adds the stone to the existing StoneString and merges the liberties. Finally, if it connects two groups it merges the groups and their respective liberties together. If a group has it's last liberty removed by the opposite color, the StoneString is deleted and the number of prisoners is returned.

Thanks for expanding. Why does GroupTracker need to be separate from Board? Surely it would make just as much sense, logically, for the Board to be tracking its own groups?

It's a really interesting problem to tackle actually – I've gone the whole hog with my implementation and allowed for arbitrary numbers of colours and arbitrary board geometries. It's made me realize just how powerful LINQ is :)

Also, are you implementing a bot player?

Inquisitus fucked around with this message at 18:33 on Mar 11, 2009

Inquisitus
Aug 4, 2006

I have a large barge with a radio antenna on it.

steckles posted:

I wrote some 2D finite difference time domain code for fun. Surprisingly simple stuff; It only took me half an hour to get going.

Basic double slit diffraction:

Red is the X component of the H field, green the Y, and blue is the E field.

Oh god not diffraction slits :suicide:

Adbot
ADBOT LOVES YOU

Inquisitus
Aug 4, 2006

I have a large barge with a radio antenna on it.

Roflex posted:

Something like in the original version?



Also, video's up, I'll annotate it later: http://www.youtube.com/watch?v=T26nQX1Pc6g&fmt=22

What'd be nice is if the opacity of the cells fades out as they sink, so they don't just suddenly disappear.

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