Kai Staats: writing

My first GP polynomials!

First GP Tree by Kai Staats Having wanted to replace the grey matter in my head with something more valuable, eg: whipped cream, the recursive loop now generates polynomial strings!

In order to convert the resulting string to an executable polynomials, Arun suggested the library Sympy. Sympy even evaluates the algo, producing a simplified version and/or returning ‘0’ if it is not functional. If this works, I will not need to write an evaluator.

New to this version, the code now calls external .csv files for available functions and terminals. At the very bottom of the run, it auto-generates the polynomial.

Fun!

By |2017-11-25T00:03:03-04:00April 6th, 2015|Ramblings of a Researcher|Comments Off on My first GP polynomials!

My first GP trees!

First GP Tree by Kai Staats After 10 days coding, I have completed a GP tree generator!

Tested are Full and Grow trees through depth 5. Both parents and children are properly recorded. I can run ‘trees’ from the command line to view the Numpy array which holds the tree.

The Python code is coming along nicely. Clean, commented, and modular such that I will be able to extract all internal functions as external methods. A few more changes, such as making the section that builds the root a function, but it’s getting there.

It will be relatively simple to draw upon external data sets for the FUNCTIONS (operands) and TERMINALS (features) as the entire code base is designed to scale.

Yeah!

By |2017-11-25T00:02:54-04:00March 30th, 2015|Ramblings of a Researcher|Comments Off on My first GP trees!

Homeless in Cape Town, part VI

My friend Eurica, the car-park lady whom attended our Christmas dinner last year has had a very difficult few months. More accurately, a difficult decade.

Both her brothers are now dead due to gang shootings (the youngest killed two months ago). The Muizenberg Law Enforcement repeatedly take all the belongings of the homeless population, a weekly punishment rather than proactive law enforcement. (Last year I confronted a managing officer and he openly admitted to their thieving.)

What little money she earns, what clothing she has is frequently stolen while sleeping in upper Muizenberg park.

Her husband was killed twelve years ago, leaving her a single mother to a now 12 year old girl and 16 year old boy. They live a few hours from here by bus, with Eurica’s mother-in-law.

Today, I was walking back from the train station and saw Eurica sitting by the beach, clearly shaken. She said two police officers and her mother-in-law showed up today, unannounced. She had burst into tears, fearing that one of her children was now dead too. But they came to force her to make child support payments. Now, she fears she will be thrown into jail for inability to pay.

I went up to my AIMS office at 9:30 pm and spent an hour doing research. I printed three websites about child support law in South Africa, and hi-lighted the sections that pertained to her. In particular, the formula they use to calculate the payment amount, as there is no fixed amount.

I found a SA government subsidy program for single mothers which pays 350R per month per child, or $32 USD. Incredible that anyone can live on that. I have heard that families in the Townships, just down the street, live on $50 a month. Rice and water.

I then wrote a letter addressed to the magistrate which provided a positive disposition, stating that Eurica loved her children, wanted the best for them, and appreciate the past twelve years of care her mother-in-law has given. I detailed the challenges of her life and closed with an offer of 150R per month (at Eurica’s suggestion) and then gave her 300R as pre-payment for the months of October and November.

I gave her a strict set of rules for how to manage the meeting, making certain to bring all legal documents back for my review before signing. I want to make certain she does not sign away her kids nor commit to some amount she cannot afford.

She is suppose to have a government social worker, but none has been provided. I will fill that role until we can figure out what is going on. Plenty of experience in these matters between my parents’ life work and my time playing attorney for Terra Soft.

The hardest part of the evening was when she broke down and sobbed, saying, “This is not the life I imagined. I don’t understand why this is me. I stopped prostitution. I stopped taking drugs. I don’t drink. I pray to God but he never answers. My brothers are both dead. My mother has gone crazy. And I barely live day to day. I don’t believe there is a God any more … or he has abandoned me.”

Earlier today she took a handful of tablets in an attempted suicide. A friend rushed to the store and made her drink 2 litres of milk, which caused her to vomit, and she survived.

When we were talking, the stress in her body was so evident one of her eyes vibrated while the other was shut; her hands opened and closed uncontrollably, her face listless and speech slurred. She can’t take any more stress. She is on the edge.

Last year I had promised to help her with a proper CV and training to get a job. I have not done this, despite the fact I see her a few times a week. I know I have failed her in that respect. I don’t believe she will stop fighting and making bad decisions, therefore I don’t believe the CV will make a difference. But I know I should try. I need to follow-through, as I did tonight.

Two of the car park attendants are walking her to the next town where she has a place to stay until the meeting at the court, in the morning.

I gave her a clipboard, pen, the cash, and my card if she needs help during the meeting. I hope they don’t coerce her into something illegal. The legal system is bad enough in the States, I can only imagine what is attempted in South Africa.

This entire experience is a bold reminder of all the years my father worked as a social worker, the stories of the challenges of life brought home to the dinner table each night.

I find myself scared, sometimes not wanting to be around Eurica for long periods for more than a quick chat. Her stories are dismal and the look of her weathered, worn face, ten years my junior, a reminder of what living without shelter means. Her hands are those of an elderly woman as her body is fighting HIV.

Sometimes I just want to walk away and not look back because it is so fucking hard to realise how much people suffer. I know I could not survive a day without hope, the way she has for more than a decade.

By |2018-11-24T01:48:41-04:00March 24th, 2015|2015, Out of Africa|Comments Off on Homeless in Cape Town, part VI

Loggerhead Saved!

Kai Staats: turtle rescue This past Friday I walked to the beach for a short run and yoga session when a surfer walked up and handed me a Loggerhead hatchling, an incredibly small turtle.

I took him back to my apartment complex and knocked on my neighbour Hannah’s door. The look on her face was priceless when she said good morning, but then saw the turtle cupped in my hands.

It was 7:30 am. Hannah called the Two Oceans Aquarium which instructed us how to care for him (her?) until we could make it to town. We placed her on a dry towel inside a small tupperware container and drove to Town. The turtle become more and more listless, eventually not moving unless I touched his shell or front flippers. Even then, almost no reaction. I was afraid she was not going to make it.

Kevin, a marine biologist greeted me at the front counter. I was given a behind-the-scenes tour as we worked our way up a few flights of stairs to a room full of noisy compressors, filtration systems, and glass aquariums which contained a variety of rescued sea animals. One was a very large turtle which was blind in both eyes, but is apparently recovering.

Kai Staats: turtle rescue

Kevin washed the hatchling in fresh water, removed a barnacle, and then placed her in a deep plastic tray at the bottom of what will be his new home for the coming year. He filled up the tank with room temperature water which in turn heated his container.

Kevin explained that Loggerheads do not nest on this side of the continent, so far south for the water is far too cold. He was likely caught in the Indian ocean current that periodically warms False Bay (and Muizenberg beach). He was adrift for no less than two weeks. Only one in a thousand reach sexual maturity (17-33 years), and even then, they have very low reproductive rates.

Within just a few minutes, the turtle came back to life. I had forgotten how much reptiles are affected by the temperature of their surroundings. The cold Atlantic water and then dry, cool air in the car had slowed her down considerably.

By |2017-04-10T11:17:34-04:00March 22nd, 2015|2015, Out of Africa|Comments Off on Loggerhead Saved!

Silhouette

I know you only by your silhouette.
Walking, running, dancing in the sea’s foam.

I know you only by your outline,
glowing against the rising sun.

I know you only by the shape
of what I hoped we’d become.

By |2015-07-10T06:16:14-04:00March 9th, 2015|The Written|Comments Off on Silhouette

Zen & the Art of Research

Our professor Bruce took us on a 5 days, zen meditation retreat. Yes, a meditation research retreat. How cool / weird / awesome is that?!

We spent 8 hours each day not talking, and then talked about not talking over dinner. Wasn’t all that different from normal research, in my experience. The venue was stunning. A gorgeous, isolated guest farm about two hours South and East of Cape Town.

Thank you Nadeem, Arun, Gilad, Eli, and Martin for a great week … of not talking.

On departure we learned the next group to come through the guest farm is an orgasm retreat. I think I signed up for the wrong week.

By |2017-11-25T00:02:47-04:00March 6th, 2015|Ramblings of a Researcher|Comments Off on Zen & the Art of Research

Concretely Andrew Ng

Today I completed the Andrew Ng open course on Machine Learning

Every morning for the past two months I have awaken (woke? waked? woke up?) at 6 am, on the beach by 6:30, then run, surfed, practised yoga or a combination for an hour. Back to my flat for breakfast and 1-2 Andrew Ng videos until 10 am. Down to AIMS for tea and into the office (where I am distracted by the view of the waves and beach).

Had to watch some of the lectures more than once, to absorb all that was presented. I paused at every formula in order to copy it into my small, spiral notebook. Over 50 pages in all. The first two chapters were hard to get through, but then I gained a kind of momentum–I even looked forward to the videos.

If you desire a crash course to Machine Learning, this is the way to go.

However, I hope to never hear the word “concretely” again.

By |2017-11-25T00:02:40-04:00March 1st, 2015|Ramblings of a Researcher|Comments Off on Concretely Andrew Ng

From Java to Python

Today I engaged Emmanuel in a Skype call to review my first Python translation of his Java code. I then sketched a workflow diagram (in gedit), which I delivered to Emmanuel for his review. Feels good to have made progress, even if just a few lines of code.

Given that I don’t know Java, this is going to be an arduous process.

By |2017-11-25T00:02:33-04:00February 28th, 2015|Ramblings of a Researcher|Comments Off on From Java to Python

Live Long and Prosper

Mr. Spock

The death of Leonard Nimoy is moving for me. Nimoy was an actor who incorporated the essence of what the character Mr. Spock meant for him, into his every day life.

Having grown up with Star Trek re-runs, even ten years after they had aired (played at prime times throughout the ’70s), much of who I am and what I yet expect of our species was given foundation in that sci-fi TV series.

Perhaps it is a curse, to always compare where we are to where we thought we’d be, but even 100 years from now it seems the foundation of Nimoy’s character Spock will remain an important goal.

He continually strove for balance between the deeply rooted emotional, reactionary side of being a human and the reasoning which enables us to work together, to grow beyond our animal foundation and achieve what no one person can do alone.

Yes, live long and prosper. But more importantly, perhaps, find balance and thrive.

By |2017-04-10T11:17:35-04:00February 28th, 2015|The Written|Comments Off on Live Long and Prosper

Only a surfer knows the feeling

The sun rises over the back-line, black silhouettes against the shimmering horizon. Sometimes, only shoulders or a head show, the full upper body of the surfers adjacent to me temporarily hidden in the rise and fall of the swell.

But this morning, the sea is nearly perfectly flat. Trapezoids suspended in a web of reflections are bound by shifting edges. They break and rebuild, again and again, each a fragmented mirror for the sparse clouds overhead.

Some days the water is turquoise blue. Others, a dark, river bottom red which gives the false appearance of a far thicker substance. The spring tide brings high water followed by broken shells, sea life, and the occasional body of an adult seal or lost, barking pup.

My legs below the knee are wrapped beneath my surfboard while my upper body constantly adjusts to the undulating water, stomach muscles tensing and relaxing to counter the shifting centre of gravity. Even after months of surfing, I yet find it difficult to bring my arms across my chest or to my front when sitting on a shorter board. Instead, my arms are at my sides, touching the surface of the water to maintain balance, a fluid equilibrium.

I look around me am reminded how new I am to this sport. The more adept sit upon far smaller boards, sometimes lying back as though in a reclining chair. Relaxed, they seem far more at ease. I keep reminding myself how far I have come since mid December, from total frustration to riding every wave I catch.

A poster in the window of a local surf shop caught my attention. A determined man, tangled hair high above his head, turns one hundred eighty degrees far above the crest of a wave. As I walked past I noticed the caption, white on blue, “Only a surfer knows the feeling.”

If to be a surfer is to know the feeling, then I will claim, even with such limited experience on board at sea, to be a surfer. As my instructor and friend William has said more elegantly, it is not just riding the waves that makes surfing so compelling, but the time spent between the runs, sitting on the board at the backline, watching the sun rise or clouds roll in

Some days, hours after I have come in from the water, showered, and transitioned to the confines of brick, mortar, and office walls, my chair feels as though it is in motion, rising, falling, and rising again. Inside my body, I undulate with the same rhythm. I nearly grasp the edge of my desk before I am returned to the reality of the moment, and look out the window to determine if the waves provide the ideal medium for my return.

I am learning to read the water in a way that I have not since I kayaked in Glacier Bay, Alaska for ten days, or when I spent a summer running rivers in Utah and Colorado. There is a subtlety to the sea’s motion that tells you the direction of the wind, if the tide is rising or falling, and sometimes its temperature too.

On the water, body prone, head lifted to see just inches above the tip of the board, the smallest of eddies toss and turn the prone, paddling surfer. One meter, two meter, three meter swells remind you how small, how incredibly minimal the mass of your body is against the tireless force.

Looking to the South, toward the backline, surfers seek breaks in the wave, places to pass such that less energy and time are wasted to gain the ideal position. For every wave, full or broken, you must choose a course of action. Dive beneath by shifting your body to the front of the board; lift your chest high to force the water to channel between you and the board; or flip upside-down, the board remaining on the surface, you beneath, only to right yourself again on the other side.

Long board, mini-Malibu, or fish–you must find the best spot to launch your campaign. Depending upon your board, fitness, and experience, you catch what is right for you.

I find my way to the back line, sometime with ease and grace, sometimes with an exhausting, twenty minute struggle, … sometimes not at all no matter how hard I paddle.

Last week, just before 7 am, the water was incredibly smooth, the swells minimal. As I paddled out to where a dozen surfers had already arrived, I noted the fins and bodies of dolphins rising and falling all around the boards. Everyone was talking in hushed tones, pointing. For more than fifteen minutes these sleek creatures moved in and around our human figures. Two women were furthest out, having tried to catch-up with the dolphins given their relatively slow pace.

The dolphins did not seem to mind, for they circled one or twice and surfaced right along side, less than two meters from the women on their boards. One surfer slipped off his board and dove as far as his leash would allow to get an underwater view of the pod.

It was, as I have heard people report, an emotionally charged encounter. I don’t believe they are healing nor necessarily incredibly intelligent as we have heralded without evidence for so long, but there is something beautiful about sharing the water with another mammal. It just feels … familiar.

The wind picked up, driving the small swells into proper wave faces, cresting and breaking in a nearly straight line. Muizenberg is ideal for learning in many ways, for you can walk out and ride in on most days. The only frustration is that the waves do not maintain a proper, clean face for long. You must get on fast, choose your direction, and allow the wave to pass beneath you when it collapses to foam.

I face out, looking beyond the backline where I rest. The swells grow over the course of a half hour. They begin to break close to the beach, the cheers of surfers catching the first waves of the morning carry to us and onto shore. It’s motivating, to witness the success of your companions.

Finally, one I believe I can ride. Sitting on the back third of my board, I spin to face the shore again, lying down quickly. I tap my toes against the very tail of the board to confirm my position given what I judge to be the vertical angle of the on-coming wave, adjust for balance, and paddle.

The sea rises slightly and with it, I rise too. I look to my right and see two meters of water behind and above me. I paddle three, for times more and then as my board tilts forward, throw my arms over my head at the same time for a few power strokes. To my right another, more experienced surfer catches the wave and is carried away as though some mighty creature chose him to carry to shore.

I, however, did not time my approach and missed the opportunity. Frustrated, I am reminded how much I have to learn. Unlike climbing or running which seem to dictate a fairly similar body type for success, surfers come in all shapes and sizes. Guys with bellies bigger than a pregnant woman do flips and turns while a white haired, arched-backed man clearly in his seventies catches every wave he intends. He is a regular, one I watch intently each morning we share.

My third try I am on the cusp, my board balanced just over the edge of the face of the wave. I look down into a well two, maybe two and a half meters deep. I throw my arms over and over, kicking my legs in the air to break the inertia and finally, I drop down the face at a tremendous speed. Quickly, I find my hands on the edges of the board, prop my chest high, confirm I am not about to run over anyone, and then spring onto my feet.

Leaning back, I allow the wave to catch-up (for many times, I am not yet quick enough to catch the wave properly), and then adjust my hips and shoulders and stance to ride what remains until it crumbles to foam.

On a good day, with long runs, I enjoy the simple accelleration, fine tuning my ability to gage the direction of the break and to stay on the face. For others, I am up for only ten, maybe fifteen seconds. On those short runs, I work on quicker turns and walking to the front of the board as the waves presses down on the back end.

As the poster says, “Only a surfer knows the feeling.” Falling, falling, falling–as long as the wave is moving forward, you are granted a liquid, perpetual motion machine.

Time just sitting at the backline. The potential sighting of a seal, dolphin, or shark. The sweet taste of the sea. The smell of atomised salt water in the gusts of wind. Even the hard pounding one can take in the face of large waves is part of my life now. I find it difficult to imagine moving back to the desert or high mountains where the ocean has not provided this kind of engagement for tens of millions of years.

Until the next opportunity, my body longs for the motion of the waves.

By |2017-04-10T11:17:35-04:00February 21st, 2015|2015, Out of Africa|Comments Off on Only a surfer knows the feeling
Go to Top