Press "Enter" to skip to content

Posts tagged as “Dragon Writers”

Now it’s starting to feel possible again …

centaur 0

Camp Nano 2016-04-19b.png

I was literally dreaming all night about the chapter I wrote today - I got up several times with tears in my eyes, as one of Dakota’s enemies unexpectedly turned into one of her strongest allies. Fascinating what a fictional world can do to you. But the upshot is, I got 4,000 words done for two days in a row … and have a clear path for what I need to write tomorrow.

Camp Nano 2016-04-19a.png

We may win this one yet! Assuming I survive this weekend’s craziness! Which I can’t tell you about, but … aaaa!

-the Centaur

Now that’s what I’m talking about …

centaur 0

Camp Nano 2016-04-18c.png

4200 words today! Keep that up for 3 more days, I’ll be more or less back on track.

And then I’ll still have 18,000 words left to write this month. AAAAA!

Onward!

-the Centaur

Briefly …

centaur 0

Camp Nano 2016-04-18a.png

Is the novel back on track? NO. But am I up to speed? YES.

Of course, I know I’ll lose more days, so really, to finish, I’m going to need to do even more than the—hork!—2750 words per day that my spreadsheet predicts I’ll need to do to get back on track.

But I’ve gotten a much better groove, the story is starting to dovetail nicely, and some sections which felt out of place have, after a few moves, found a nice home in the story.

Camp Nano 2016-04-18b.png

The rocket is taking off, but there’s a long climb ahead.

Back to it.

-the Centaur

The good news and the bad news

centaur 0

20160416_215852.jpg

The good news is I wrote ~2800 words yesterday, more than I needed. The bad news is I wrote 900 of those words by hand in my notebook (so as to not disturb the other diners in the dark and quiet restaurant with the typing coming from my glowing laptop), and took most of this afternoon’s writing session to get them all typed in. Argh! Still, I’m happy with the results ...

“So,” Avenix said. “We have begun to seek out, in all our holdings, other threats—”

I raised my hand. “Hang on,” I said. Filling in the blanks, this ghost had to have been a fae hunter; that’s why they called me. But Avenix wasn’t saying that outright: he seemed to be feeding me my own lines. “You feared a threat to your realm … started a search for dangerous use of magic … then called me to deal with the problem. Did I get that right?”

“Well … yes,” Avenix said.

“Don’t lie to me!” I said, slapping my hand on the table. “What’s your real goal?”

“I am not lying to you,” Avenix said.

“Why would he lie to you?” Nyissa asked. “It’s a reasonable course of action—”

“Are you all insane?” I said. “Do you have no memories? Ten years ago—ten months ago—you’d have all been tearing each other apart, lashing out at everyone in sight, blaming anyone you could get your hands on to deal with your problems. You’d have been at war with Sidhain just because this happened on her doorstep—”

“Not likely,” Avenix said, shuddering.

“Save it! She has a real bad attitude,” I said, “but she’s pretty damn inoffensive for an alleged apocalyptic horror, and I’ve seen you in action against witchhunters! You can’t expect me to believe you’re all playing nice just because I came along!

Sounds like Dakota and Avenix are going to have it out. Onward!

-the Centaur

Back in motion, but not yet on track …

centaur 0

Camp Nano 2016-04-16.png

Several times in the past few days, I’ve finally gotten up to speed on Camp Nanowrimo. Only problem is, because I got so far behind, I need to go 50% faster than I’m already doing … and to catch up this weekend, even if such a thing was possible, I’d have to write eight times as much as I’ve already written today. Aaaa!

Still, onward!

-the Centaur

A Partial Answer …

centaur 0

Camp Nano 2016-04-15.png

… to how I made so little progress yesterday: halfway through yesterday’s writing session, I started entering yesterday’s wordcount into today’s row of the spreadsheet, effectively cutting my apparent wordcount for the day in half.

That would do it.

No excerpts; I just experimented with a new chapter 1 and I want to try it on for size before I share it. But it seems to dovetail nicely with what I’ve already written … and it was 800 free words, springing fully formed from my pen, uh, keyboard.

Onward!

-the Centaur

Gaah!

centaur 0

Camp Nano 2016-04-14.png

Gaah! How do I spend an hour writing a new long scene and only get 500 words out of it? 17% done, 30% behind. Aaa! Still, I got this. Just … need … to … write … faster ...

-the Centaur

Surfacing

centaur 0

Camp Nano 2016-04-13.png

Is the novel back on track? NO. But I am reaching the point where I have enough traction in the story that I’m starting to make real progress. I’m 14,000+ words behind, I need to write over 2,500 words a day to finish my 50,000 words in the month … but at least I’m making real progress now. An excerpt:

The looming tower of Brendelbane Manor leered down at me, its three irregular windows looking even more like a skull. Yes, it was the same room, the nook at the front of Alissa van Kreveld’s room—but was there now flickering light within?

And … was the thing we’d seen Alissa van Kreveld? The phantom hadn’t looked like a Scottish refugee or a woman of Dutch descent; its hair and face had looked distinctly Asian, like a concept drawing for a mash-up of The Grudge and Memoirs of a Geisha.

So if it wasn’t her … who was it? What was it?

In horror movies, it seemed like you had a fifty-fifty chance of a ghost being a human ghost or a real demon. My personal experience told me next to nothing about ghosts, but any kind of phantom had a seventy percent chance of being a projectia, and a ninety percent chance of it turning out to be something hostile.

I stopped for a moment. No. That was my bad attitude talking. Chris Valentine’s projectia, the Streetscribe’s projectia, Cosgreave’s specter: all hostile. My Dragon, Arcturus’s vines, Avenix’s tentacle monster: all benign. The odds were closer to fifty-fifty. Even if this ghost had chased us out of the property with phantom fire, it might not be a hostile.

Still … my girlfriend was inside, and this thing spat phantom fracking fire.

Screwing up my courage, I drew my sword, ascended the steps … and went inside.

Onward!

-the Centaur

Hounded

centaur 0

Writing Popularity 2016-04-09.png   

Is the novel back on track? NO.

For an idea of why I push so hard on this, though, take a look at this graph of how popular my books have been over time (a graph compiled by myself looking at data from various sources). It may not be readily apparent, but every time a new book is released, all my books spike in popularity, then slowly decline. The graph starts at the release of BLOOD ROCK, and the big gap between that and LIQUID FIRE - working on stories for anthologies - really caused things to fade away. If I want to write all the time, I need people to buy my books, so I need to produce books, to get back on track with novels coming out on a regular basis.

So … back to PHANTOM SILVER.

-the Centaur

Blood in the Water

centaur 0

Camp Nano 2016-04-08a.png

Well, shoot. Camp Nano not going well so far. Blast ye, taxes. Is the date right? Should I make Dakota worry about her taxes too, just to be mean? Checking The Grid … no, dangit, her taxes wouldn’t be due until the next book. Sigh.

Back to work.

-the Centaur

An Open Letter to Matt Damon, Andy Weir, Ridley Scott, and Harry Gregson-Williams

centaur 0

mars-thumbsup.png

Thank you for The Martian. That is all.

Oh, while I’m here I should also extend my thanks to Michael Peña, Jeff Daniels, Chiwetel Ejiofor, and the rest of the fine cast and crew that made it possible. But that which pops most to my mind is Matt Damon directed by Ridley Scott to say Andy Weir’s lines, with Harry Gregson-Williams’ music in the background. Thank you.

Back to the novel (and the book launch, and the deep learning, and the taxes). That is all.

-the Centaur

Can’t Blog! Noveling!

centaur 0

20160330_194346.jpg

Can’t blog! Noveliing! Also, taxing, Q2 OKR planning, book publishing, and general panic. Enjoy pictures of a nice restaurant and its delicious food!

20160330_200125.jpg

-the Centaur

Back to PHANTOM SILVER

centaur 0

Phantom Silver v1.png

Back at work on Dakota Frost #5, PHANTOM SILVER, for Camp Nanowrimo. I’m at 50,000+ words already and hope to get it to 100,000 words the month of April, then finish the book off in Camp Nanowrimo in July. My summary from the Camp Nano page:

Dakota Frost --- Skindancer, magical tattooist, chair of the Magical Security Council, and harried mother of a teen weretiger and a teen half-elf --- still has to pay the bills. Fortunately that involves something awesome, being a headliner on the supernatural debunking show The Exposers billed as the Skeptical Witch.

Too bad their latest adventure turns up a very real ghost, which latches onto Dakota to help dispel its ancient family curse. Add to that a reawakened fae curse, an invasion from the land of the dead - and an annoying older brother - and you have a recipe for disaster.

and an excerpt of yesterday’s writing:

“Alright, your turn,” I said.

“Mo—uh, my Lady Frost, I do not think—” Benjamin began.

“What did you say?” the sphinx said, claws scraping against granite.

“You asked me a riddle, now I ask you a riddle back, correct?” I said.

“You wish to duel me?” the sphinx said. “I accept!”

“Wait,” I said, befuddled, “weren’t we dueling already?”

“It was a riddle challenge,” Benjamin said. “Trolls ask one, sphinxes three—”

“The riddle game is from The Hobbit, Mom,” Cinnamon said, tugging at my arm.

“The riddle game is an ancient and honorable mode of dueling and I accept,” the sphinx roared, stamping one paw, so that all three of us cringed back. “I accept! We must answer three riddles each before we pass by; at the first slip … the winner takes the loser as the prize.”

Oh dear! Sounds like Dakota and her brood are in trouble!

Now to brew up more of it. Back to work.

-the Centaur

P. S. Planning it out, it looks like the next three Dakota Frost books will dovetail nicely with the first three Cinnamon Frost books, so I have a loose hexalogy on my hands. I had to look that one up, God help me. (And I pray He does.)

Back at Work

centaur 0

100_0672.JPG

Briefly getting some edits in on SPECTRAL IRON before diving back into PHANTOM SILVER in April. That is all

-the Centaur

She is Sent

centaur 0

jw-on-her-way.png

Also on the note of resurrections, the latest version of JEREMIAH WILLSTONE AND THE CLOCKWORK TIME MACHINE is winging its way back to the publisher. Apropos, that I sent this back at Easter: this book has been through so many drafts that I’m starting to feel dizzy. I expect there will be at least one more, though, so I’m prepared.

Lots more work to do. For now, though, back to SPECTRAL IRON.

-the Centaur

I can’t channel John Scalzi

centaur 0

Screenshot 2016-03-03 20.28.41.png

Imitating Scalzi’s inimitable style (at least when he’s too busy to blog): “Has the novel been sent back to the editor? NO.”

But Debra did like the new first couple of chapters for THE CLOCKWORK TIME MACHINE, and her guidance gives me a clear path forward to cleaning them up, and the changes to the rest of the novel are minor … if I could Just. Get. More. Time. Friends from grade school are crossing the country to visit me, and friendly mathematicians are dropping by my coffeehouse table to school me on Clifford algebras and deep learning, to the point at which I finally had to turn down an impromptu lunch meeting today with someone who really wanted to know more about my team, just because I had no more time.

So, having no more time, just now I wanted to throw up a quick blogpost, other than the half dozen half-finished longer blogposts I can’t get done and still get to my own work. So I tried imitating John Scalzi’s quick posts when he’s backed up. Normally a sentence, and a photo. That’s it. But today, Google Photos and AT&T’s network and my phone and SPACE GREMLINS have conspired to make it impossible for me to upload photos in a timely fashion, I mean, dammit, how hard is it to write a sentence and post a photo?

THIS is why Scalzi is paid the megabucks.

I am no John Scalzi, so, here, you get a picture of the structure of the first 72 positions in tic-tac-toe, because I can’t not do the foundational work on a problem once I’ve thought of it, or I’ll never get back to it. This is important, it will mean something, I promise. But later.

Back to the novel.

-the Centaur

P.S. Yes I know my Mathematica could be simplified via NestList or something like that, don’t bother me, don’t bother me.
Screenshot 2016-03-03 20.34.35.png

Visualizing Cellular Automata

centaur 0


cellular-automata-v1.png

SO, why's an urban fantasy author digging into the guts of Mathematica trying to reverse-engineer how Stephen Wolfram drew the diagrams of cellular automata in his book A New Kind of Science? Well, one of my favorite characters to write about is the precocious teenage weretiger Cinnamon Frost, who at first glance was a dirty little street cat until she blossomed into a mathematical genius when watered with just the right amount of motherly love. My training as a writer was in hard science fiction, so even if I'm writing about implausible fictions like teenage weretigers, I want the things that are real - like the mathematics she develops - to be right. So I'm working on a new kind of math behind the discoveries of my little fictional genius, but I'm not the youngest winner of the Hilbert Prize, so I need tools to help simulate her thought process.

And my thought process relies on visualizations, so I thought, hey, why don't I build on whatever Stephen Wolfram did in his groundbreaking tome A New Kind of Science, which is filled to its horse-choking brim with handsome diagrams of cellular automata, their rules, and the pictures generated by their evolution? After all, it only took him something like ten years to write the book ... how hard could it be?

Deconstructing the Code from A New Kind of Science, Chapter 2

Fortunately Stephen Wolfram provides at least some of the code that he used for creating the diagrams in A New Kind of Science. He's got the code available for download on the book's website, wolframscience.com, but a large subset is in the extensive endnotes for his book (which, densely printed and almost 350 pages long, could probably constitute a book in their own right). I'm going to reproduce that code here, as I assume it's short enough to fall under fair use, and for the half-dozen functions we've got here any attempt to reverse-engineer it would end up just recreating essentially the same functions with slightly different names.
Cellular automata are systems that take patterns and evolve them according to simple rules. The most basic cellular automata operate on lists of bits - strings of cells which can be "on" or "off" or alternately "live" or "dead," "true" and "false," or just "1" and "0" - and it's easiest to show off how they behave if you start with a long string of cells which are "off" with the very center cell being "on," so you can easily see how a single live cell evolves. And Wolfram's first function gives us just that, a list filled with dead cells represented by 0 with a live cell represented by 1 in its very center:

In[1]:= CenterList[n_Integer] := ReplacePart[Table[0, {n}], 1, Ceiling[n/2]]


In[2]:= CenterList[10]
Out[2]= {0, 0, 0, 0, 1, 0, 0, 0, 0, 0}


One could imagine a cellular automata which updated each cell just based on its contents, but that would be really boring as each cell would be effectively independent. So Wolfram looks at what he calls "elementary automata" which update each cell based on their neighbors. Counting the cell itself, that's a row of three cells, and there are eight possible combinations of live and dead neighbors of three elements - and only two possible values that can be set for each new element, live or dead. Wolfram had a brain flash to list the eight possible combinations the same each way every time, so all you have are that list of eight values of "live" or "dead" - or 1's and 0's, and since a list of 1's and 0's is just a binary number, that enabled Wolfram to represent each elementary automata rule as a number:

In[3]:= ElementaryRule[num_Integer] := IntegerDigits[num, 2, 8]

In[4]:= ElementaryRule[30]
Out[4]= {0, 0, 0, 1, 1, 1, 1, 0}


Once you have that number, building code to apply the rule is easy. The input data is already a string of 1's and 0's, so Wolfram's rule for updating a list of cells basically involves shifting ("rotating") the list left and right, adding up the values of these three neighbors according to base 2 notation, and then looking up the value in the rule. Wolfram created Mathematica in part to help him research cellular automata, so the code to do this is deceptively simple…

In[5]:= CAStep[rule_List, a_List] :=
rule[[8 - (RotateLeft[a] + 2 (a + 2 RotateRight[a]))]]


... a “RotateLeft” and a “RotateRight” with some addition and multiplication to get the base 2 index into the rule. The code to apply this again and again to a list to get the history of a cellular automata over time is also simple:

In[6]:= CAEvolveList[rule_, init_List, t_Integer] :=
NestList[CAStep[rule, #] &, init, t]


Now we're ready to create the graphics for the evolution of Wolfram's "rule 30," the very simple rule which shows highly complex and irregular behavior, a discovery which Wolfram calls "the single most surprising scientific discovery [he has] ever made." Wow. Let's spin it up for a whirl and see what we get!

In[7]:= CAGraphics[history_List] :=
Graphics[Raster[1 - Reverse[history]], AspectRatio -> Automatic]


In[8]:= Show[CAGraphics[CAEvolveList[ElementaryRule[30], CenterList[103], 50]]]
Out[8]=

rule-30-evolution.png



Uh - oh. The "Raster" code that Wolfram provides is the code to create the large images of cellular automata, not the sexy graphics that show the detailed evolution of the rules. And reading between the lines of Wolfram's end notes, he started his work in FrameMaker before Mathematica was ready to be his full publishing platform, with a complex build process producing the output - so there's no guarantee that clean simple Mathematica code even exists for some of those early diagrams.

Guess we'll have to create our own.

Visualizing Cellular Automata in the Small

The cellular automata diagrams that Wolfram uses have boxes with thin lines, rather than just a raster image with 1's and 0's represented by borderless boxes. They're particularly appealing because the lines are white between black boxes and black between white boxes, which makes the structures very easy to see. After some digging, I found that, naturally, a Mathematica function to create those box diagrams does exist, and it's called ArrayPlot, with the Mesh option set to True:

In[9]:= ArrayPlot[Table[Mod[i + j, 2], {i, 0, 3}, {j, 0, 3}], Mesh -> True]
Out[9]=

checkerboard.png


While we could just use ArrayPlot, it' s important when developing software to encapsulate our knowledge as much as possible, so we'll create a function CAGridGraphics (following the way Wolfram named his functions) that encapsulates the knowledge of turning the Mesh option to True. If later we decide there's a better representation, we can just update CAMeshGraphics, rather than hunting down every use of ArrayPlot. This function gives us this:

In[10]:= CAMeshGraphics[matrix_List] :=
ArrayPlot[matrix, Mesh -> True, ImageSize -> Large]


In[11]:= CAMeshGraphics[{CenterList[10], CenterList[10]}]
Out[11]=

lines-of-boxes.png


Now, Wolfram has these great diagrams to help visualize cellular automata rules which show the neighbors up top and the output value at bottom, with a space between them. The GraphicsGrid does what we want here, except it by its nature resizes all the graphics to fill each available box. I'm sure there's a clever way to do this, but I don't know Mathematica well enough to find it, so I'm going to go back on what I just said earlier, break out the options on ArrayPlot, and tell the boxes to be the size I want:

In[20]:= CATransitionGraphics[rule_List] :=
GraphicsGrid[
Transpose[{Map[
   ArrayPlot[{#}, Mesh -> True, ImageSize -> {20 Length[#], 20}] &, rule]}]]


That works reasonably well; here' s an example rule, where three live neighbors in a row kills the center cell :

In[21]:= CATransitionGraphics[{{1, 1, 1}, {0}}]
Out[21]=

Screenshot 2016-01-03 14.19.21.png  

Now we need the pattern of digits that Wolfram uses to represent his neighbor patterns. Looking at the diagrams and sfter some digging in the code, it seems like these digits are simply listed in reverse counting order - that is, for 3 cells, we count down from 2^3 - 1 to 0, represented as binary digits.

In[22]:= CANeighborPattern[num_Integer] :=
Table[IntegerDigits[i, 2, num], {i, 2^num - 1, 0, -1}]


In[23]:= CANeighborPattern[3]
Out[23]= {{1, 1, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 0}, {0, 1, 1}, {0, 1, 0}, {0, 0,
1}, {0, 0, 0}}


Stay with me - that only gets us the first row of the CATransitionGraphics; to get the next row, we need to apply a rule to that pattern and take the center cell:

In[24]:= CARuleCenterElement[rule_List, pattern_List] :=
CAStep[rule, pattern][[Floor[Length[pattern]/2]]]


In[25]:= CARuleCenterElement[ElementaryRule[30], {0, 1, 0}]
Out[25]= 1


With all this, we can now generate the pattern of 1' s and 0' s that represent the transitions for a single rule:

In[26]:= CARulePattern[rule_List] :=
Map[{#, {CARuleCenterElement[rule, #]}} &, CANeighborPattern[3]]

In[27]:= CARulePattern[ElementaryRule[30]]
Out[27]= {{{1, 1, 1}, {0}}, {{1, 1, 0}, {1}}, {{1, 0, 1}, {0}}, {{1, 0, 0}, {1}}, {{0,
   1, 1}, {0}}, {{0, 1, 0}, {1}}, {{0, 0, 1}, {1}}, {{0, 0, 0}, {0}}}


Now we can turn it into graphics, putting it into another GraphicsGrid, this time with a Frame.

In[28]:= CARuleGraphics[rule_List] :=
GraphicsGrid[{Map[CATransitionGraphics[#] &, CARulePattern[rule]]},
Frame -> All]


In[29]:= CARuleGraphics[ElementaryRule[30]]
Out[29]=

Screenshot 2016-01-03 14.13.52.png

At last! We' ve got the beautiful transition diagrams that Wolfram has in his book. And we want to apply it to a row with a single cell:

In[30]:= CAMeshGraphics[{CenterList[43]}]
Out[30]=

Screenshot 2016-01-03 14.13.59.png

What does that look like? Well, we once again take our CAEvolveList function from before, but rather than formatting it with Raster, we format it with our CAMeshGraphics:

In[31]:= CAMeshGraphics[CAEvolveList[ElementaryRule[30], CenterList[43], 20]]
Out[31]=

Screenshot 2016-01-03 14.14.26.png

And now we' ve got all the parts of the graphics which appear in the initial diagram of this page. Just to work it out a bit further, let’s write a single function to put all the graphics together, and try it out on rule 110, the rule which Wolfram discovered could effectively simulate any possible program, making it effectively a universal computer:

In[22]:= CAApplicationGraphics[rule_Integer, size_Integer] := Column[
{CAMeshGraphics[{CenterList[size]}],
   CARuleGraphics[ElementaryRule[rule]],
   CAMeshGraphics[
CAEvolveList[ElementaryRule[rule], CenterList[size],
   Floor[size/2] - 1]]},
Center]

In[23]:= CAApplicationGraphics[110, 43]
Out[23]=


Screenshot 2016-01-03 14.14.47.png

It doesn' t come out quite the way it did in Photoshop, but we' re getting close. Further learning of the rules of Mathematica graphics will probably help me, but that's neither here nor there. We've got a set of tools for displaying diagrams, which we can craft into what we need.

Which happens to be a non-standard number system unfolding itself into hyperbolic space, God help me.

Wish me luck.

-the Centaur

P.S. While I' m going to do a standard blogpost on this, I' m also going to try creating a Mathematica Computable Document Format (.cdf) for your perusal. Wish me luck again - it's my first one of these things.

P.P.S. I think it' s worthwhile to point out that while the tools I just built help visualize the application of a rule in the small …

In[24]:= CAApplicationGraphics[105, 53]
Out[24]=

Screenshot 2016-01-03 14.14.58.png

... the tools Wolfram built help visualize rules in the very, very large:

In[25]:= Show[CAGraphics[CAEvolveList[ElementaryRule[105], CenterList[10003], 5000]]]

Out[25]=

rule-105-a-lot.png

That's 10,000 times bigger - 100 times bigger in each direction - and Mathematica executes and displays it flawlessly.

Uh … What the?

centaur 0

uh-what-the.png

So, as you may or may not know, I’m trying to blog every day this year, and just now, taking a brief respite after my red-eye flight, I decided to extend my tracking spreadsheet from just January to cover February. And when I did so … my tracking graphic suddenly turned into … I don’t know … an origami Pac-Man?

I’m not even sure how this particular chart type could make the above graphic, so I’m not sure how to fix it. This probably should get filed under “if you break the assumptions of a piece of software’s inputs, it will break your assumptions about its outputs.” Best thing to do is probably start over with a new graphic.

-the Centaur

Nanowrimo Triples Your Productivity

centaur 0

NanoVsNot.png

So I’ve got enough data now - two months - and it shows my productivity in non-Nano months is about one third of the Nano goal. Because December and January are 31 day months, by now I should have produced a notch over 100,000 words if this was National Novel Writing Month … but instead I’ve produced a notch under 30,000.

The picture is a bit muddled since my productivity in successful Nano months is slightly higher than 50,000 words, and my productivity this month is slightly higher since I’m not counting some writing (some edits to stories, plus all the nonfiction writing I do at work). But it shows the social effect.

Nano triples your productivity.

-the Centaur