How simple circuits can create complex behaviors